Thanks Reinis.<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; ">request_terminate_timeout = 30s worked for me.</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; ">I also started using adaptive spawning mechanism.</span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; "> </span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; ">What I am wondering about is:</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; ">-I have same config without &quot;</span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; ">request_terminate_timeout = 60s&quot; and it handles around 20K page-views daily without any issues.</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; ">-Issue appeared all of a sudden, then just 2 days back a test-site with 200MB database was created and running smoothly with 100 other sites without any problem.</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; ">-PHP-FPM debug really produced very less info which was not helpful at all.</span></div><div><br>
</div>
<div>On sidenote, why php error shows up in nginx error.log and not in php-fpm?</div><div> </div><div>--<br>Rahul Bansal | Founder &amp; CEO | rtCamp Solutions Pvt. Ltd.<br>Mobile: +91-9860501882 | Web: <a href="http://rtcamp.com/" target="_blank">http://rtcamp.com/</a><br>

<br>
<br><br><div class="gmail_quote">On Tue, Sep 7, 2010 at 10:26 PM, Reinis Rozitis <span dir="ltr">&lt;<a href="mailto:r@roze.lv">r@roze.lv</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

First of all I just noticed this in your initial mail:<div class="im"><br>
<br>
2010/09/06 22:09:40 [error] 12909#0: *1064 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.1, server: <a href="http://rahul286.rtcamp.info" target="_blank">rahul286.rtcamp.info</a>, request: &quot;GET /favicon.ico HTTP/1.1&quot;, upstream: &quot;fastcgi://<a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>&quot;, host: &quot;<a href="http://rahul286.rtcamp.info" target="_blank">rahul286.rtcamp.info</a>&quot;<br>


<br></div>
Have you by chance misconfigurated the nginx and passing also static files (in this case favicon.ico) to php backend??<div class="im"><br>
<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Debugging php-fpm log was first thing I did.<br>
</blockquote>
<br></div>
And nothing in there?<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am using &quot;log_level = debug&quot;<br>
</blockquote>
<br></div>
Debug prolly will end up as too much information anyways where in general you just need to catch something like this to pinpoint the slow scripts (for example):<br>
<br>
Sep 07 18:51:01.536661 [NOTICE] [pool www] child 17460 exited with code 0 after 5875.977592 seconds from start<br>
Sep 07 18:51:01.537240 [NOTICE] [pool www] child 18471 started<br>
Sep 07 19:12:26.791721 [WARNING] [pool www] child 18409, script &#39;/data/web/root/index.php&#39; executing too slow (5.103076 sec), logging<br>
Sep 07 19:12:26.791790 [NOTICE] child 18409 stopped for tracing<br>
Sep 07 19:12:26.791799 [NOTICE] about to trace 18409<br>
Sep 07 19:12:26.791932 [ERROR] ptrace(PEEKDATA) failed: Input/output error (5)<br>
Sep 07 19:12:26.791980 [NOTICE] finished trace of 18409<div class="im"><br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
With my pathetic patchwork, as I am restarting php5-fpm every minute,<br>
above kind of &quot;blockage&quot; is not getting created.<br>
</blockquote>
<br></div>
This is the job for FPM itself and no external tools / jobs should be needed.<br>
<br>
You could try (if not allready) the php-fpm adaptive spawning mechanism then in case there is overload situation (too few free php childs) you would see something like this in logs:<br>
<br>
Sep 05 23:31:44.601141 [WARNING] [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 16 children, there are 4 idle, and 50 total children<br>
Sep 05 23:31:45.605144 [WARNING] [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 3 idle, and 51 total children<div><div></div><div class="h5"><br>


<br>
<br>
rr <br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>