<div dir="ltr">This does not seem like an nginx issue?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 22, 2014 at 1:24 AM, shahzaib shahzaib <span dir="ltr"><<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">These are the new status for php-fpm now :<br><br><pre>pool: stats
process manager: dynamic
start time: 22/May/2014:12:17:39 +0500
start since: 3975
accepted conn: 866645
listen queue: 0
max listen queue: 2163
listen queue len: 65535
idle processes: 153
active processes: 2
total processes: 155
max active processes: 250
max children reached: 4<br><br><br></pre><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 22, 2014 at 12:37 PM, shahzaib shahzaib <span dir="ltr"><<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hello,<br><br></div> We're using nginx + php-fpm. Please check the following configurations in php-fpm and sysctl in order to handle large amount of php-fpm request, but still 1000+ requests are getting into queue every 15min.<br>
<br></div>php-fpm.d/stats.conf<br><br>[stats]<br>listen = <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a><br>user = apache<br>group = apache<br>request_slowlog_timeout = 5s<br>slowlog = /var/log/php-fpm/stats-slow.log<br>
listen.allowed_clients = 127.0.0.1<br>pm = dynamic<br>pm.max_children = 250<br>pm.start_servers = 40<br>pm.min_spare_servers = 20<br>pm.max_spare_servers = 40<br>pm.max_requests = 40000<br>listen.backlog = -1<br>request_terminate_timeout = 300s<br>
rlimit_files = <a href="tel:13107200" value="+13107200" target="_blank">13107200</a><br>rlimit_core = unlimited<br>env[HOSTNAME] = $HOSTNAME<br>env[TMP] = /tmp<br>env[TMPDIR] = /tmp<br>env[TEMP] = /tmp<br>pm.status_path = /status</div>
<div><br></div>The main config parameters of sysctl.conf :<br>
<br>vm.overcommit_memory = 1<br>fs.file-max = 7000000<br>net.ipv4.tcp_max_syn_backlog = 70000<br>net.core.netdev_max_backlog = 4096<br>net.core.somaxconn=65535<br>net.ipv4.tcp_tw_reuse = 1<br>net.ipv4.tcp_tw_recycle = 1<br>
net.ipv4.ip_local_port_range = 1024 65000<br>net.ipv4.tcp_tw_reuse = 1<br><br></div>/etc/security/limits.conf<br>root soft nofile 700000<br>root hard nofile 700000<br><br><br>We've 72G of Ram and also writing on disk is 100+MB/s on Sas drives which makes high io util% most of the time.<br>
<br></div>Any clue why requests are still getting into php-fpm queue and max children also reached errors occuring, even max_children are 250 * 40000. ??<br><br></div><div>Php-fpm status :<br><br><pre>pool: stats
process manager: dynamic
start time: 22/May/2014:12:17:39 +0500
start since: 1140
accepted conn: 228244
listen queue: 579
max listen queue: 1970
listen queue len: 65535
idle processes: 167
active processes: 9
total processes: 176
max active processes: 250
max children reached: 1</pre><br></div><div><br></div><div>Regards.<span><font color="#888888"><br>Shahzaib<br></font></span></div><div><div><div><br><br></div></div></div></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div>