<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ulimit soft limit &#8211; Scott Mcintyre</title>
	<atom:link href="https://scott.cm/tag/ulimit-soft-limit/feed/" rel="self" type="application/rss+xml" />
	<link>https://scott.cm</link>
	<description>Web Operations Engineer,  Linux Systems Administrator,  mySQL DBA,  MongoDB DBA,  Python+PHP Developer,  Performance Engineer</description>
	<lastBuildDate>Thu, 22 Nov 2012 06:44:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.2.2</generator>
	<item>
		<title>Max processes 1024 limits.conf</title>
		<link>https://scott.cm/max-processes-1024-limits-conf/</link>
				<comments>https://scott.cm/max-processes-1024-limits-conf/#comments</comments>
				<pubDate>Thu, 22 Nov 2012 06:44:24 +0000</pubDate>
		<dc:creator><![CDATA[Scott Mcintyre]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[centos ulimit]]></category>
		<category><![CDATA[linux max user processes]]></category>
		<category><![CDATA[mongodb replica sets]]></category>
		<category><![CDATA[mongodb soft limit]]></category>
		<category><![CDATA[mongodb ulimit]]></category>
		<category><![CDATA[red hat ulimit]]></category>
		<category><![CDATA[ulimit -u soft limit]]></category>
		<category><![CDATA[ulimit /etc/security/limits.d/90-nproc.conf]]></category>
		<category><![CDATA[ulimit 1024]]></category>
		<category><![CDATA[ulimit max processes]]></category>
		<category><![CDATA[ulimit max user processes]]></category>
		<category><![CDATA[ulimit pam]]></category>
		<category><![CDATA[ulimit soft limit]]></category>

		<guid isPermaLink="false">https://scott.cm/?p=186</guid>
				<description><![CDATA[We where having an issue with replica sets on our MongoDB databases changing primaries. The logs shows it was hitting resource limits creating new processes. [initandlisten] pthread_create failed: errno:11 Resource temporarily unavailable [initandlisten] can&#8217;t create new thread, closing connection There is a bug fix in the init.d available per https://jira.mongodb.org/browse/SERVER-6443]]></description>
								<content:encoded><![CDATA[<p>We where having an issue with replica sets on our MongoDB databases changing primaries.  The logs shows it was hitting resource limits creating new processes.</p>
<blockquote><p>
[initandlisten] pthread_create failed: errno:11 Resource temporarily unavailable<br />
[initandlisten] can&#8217;t create new thread, closing connection
</p></blockquote>
<p>There is a bug fix in the init.d available per https://jira.mongodb.org/browse/SERVER-6443 to increase the ulimit -u however while working through increasing the available max processes on RHEL I was noting the soft limit would not increase past 1024 when checking /proc/pid/limits even when being increased in the startup script.</p>
<blockquote><p>
Limit                     Soft Limit           Hard Limit           Units<br />
Max cpu time              unlimited            unlimited            seconds<br />
Max file size             unlimited            unlimited            bytes<br />
Max data size             unlimited            unlimited            bytes<br />
Max stack size            10485760             unlimited            bytes<br />
Max core file size        0                    unlimited            bytes<br />
Max resident set          unlimited            unlimited            bytes<br />
Max processes             <strong>1024</strong>                 256662               processes<br />
Max open files            8192                 8192                 files<br />
Max locked memory         65536                65536                bytes<br />
Max address space         unlimited            unlimited            bytes<br />
Max file locks            unlimited            unlimited            locks<br />
Max pending signals       256662               256662               signals<br />
Max msgqueue size         819200               819200               bytes<br />
Max nice priority         0                    0<br />
Max realtime priority     0                    0<br />
Max realtime timeout      unlimited            unlimited            us
</p></blockquote>
<p>It turns out the pam package provides a file /etc/security/limits.d/90-nproc.conf which explicitly overrides the settings in security.conf for the number of processes,</p>
<blockquote><p>
# Default limit for number of user&#8217;s processes to prevent<br />
# accidental fork bombs.<br />
# See rhbz #432903 for reasoning.</p>
<p>*          soft    nproc     1024
</p></blockquote>
<p>Changing this allowed the number of processes to be increased.</p>
]]></content:encoded>
							<wfw:commentRss>https://scott.cm/max-processes-1024-limits-conf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
							</item>
	</channel>
</rss>
