Forum: NGINX php-fastcgi stalling

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Kiril A. (Guest)
on 2009-04-11 05:17
(Received via mailing list)
Ok, here is a problem I had before but did not pay enough attention. I
have php-cgi spawned with a simple init.d script. 10 child processed.
I send one request to a PHP script let's say sloooooow.php, so the
browser waits for the page to load but the problem is that while that
page is loading, no other php page can be opened. That happens usually
when I do send a slow query through the phpMyAdmin but it can happen
on the production site also.

So, anybody know what the problem can be? Obviously php takes time to
respond but that should not stop nginx from serving other request. I
am pretty sure the problem is in PHP but what could it be?

Thanks in advance.
Denis F. (Guest)
on 2009-04-11 19:27
(Received via mailing list)
Too little information to tell for sure, but it seems the problem is
caused by
MySQL table locking issues, not PHP.
Michael S. (Guest)
on 2009-04-11 21:37
(Received via mailing list)
Sat, Apr 11, 2009 at 8:21 AM, Denis F. <removed_email_address@domain.invalid>
> Too little information to tell for sure, but it seems the problem is caused by
> MySQL table locking issues, not PHP.

which would create a chain reaction, which has happened to me before...

mysql blocking/taking time -> php -> nginx waiting for the response

try removing your mysql queries (or profiling them) and see if you
have the same stalling issues

there could be a variety or other things, but that's low hanging fruit..
Kiril A. (Guest)
on 2009-04-12 10:55
(Received via mailing list)
not an option, next?
SSSlippy (Guest)
on 2009-04-12 10:55
(Received via mailing list)
Switch to php-fpm

Posted at Nginx Forum:,976,977#msg-977
Eugene Lazutkin (Guest)
on 2009-04-12 14:52
(Received via mailing list)
Circular reference?
Kiril A. (Guest)
on 2009-04-12 15:03
(Received via mailing list)
That's why I usually hate to ask vague question but after many hours
of fixing other things this just top it off. I understand it is
difficult to tell what the problem is, but what I was more interested
in was whether there is a well know problem. Just want to know if it
is justified to dig more seriously into the problem.

So thank you, I got my answer.

On Sat, Apr 11, 2009 at 7:07 PM, Eugene Lazutkin
Peter Langhans (Guest)
on 2009-04-13 19:17
(Received via mailing list)
I know, I did not contribute to this one, but if this is what you liked
know in first place, why don't you take the time, think about it before
hit the send button, think about it again, then one more time, and
it's you one more last time. Think whether it's really what you want to
THEN send it.

A thank you to all the other guys would be very much appreciated Mr.
A. but then again, maybe you are still thinking about whether to send
stuck in an infinite loop like your php program unable to process
any further.
Kiril A. (Guest)
on 2009-04-13 21:28
(Received via mailing list)
Mr. Peter Langhans, which part of "So thank you, I got my answer." you
did not understand as a thank you to the people who wrote to me? I
have been subscribed to the list for almost a year and I have read >
70% of the emails and I have been using the nginx during all that time
and yes I did have to find rewrite rules, yes I did have special
settings but never bothered the list as I knew I can find the answer
otherwise and let my asking for when I really needed it. And guess
what, I that first email was that time. My question was simple, does
anybody know? Because I was pressed by time restrains and wanted to
send an email to ask if somebody had the same problem or not. Negative
answer is also a helpful answer and I guess that's why people did
reply, for which I was NOT sarcastic when I said "thank you" and I did
not whine about nobody answering, etc.

For God sake, people...

On Mon, Apr 13, 2009 at 6:07 PM, Peter Langhans
Peter Langhans (Guest)
on 2009-04-13 21:47
(Received via mailing list)
did it ever occur to you that your problem might, now or some time
also concern other people. so your "thank you" together with the fact
you did not bother posting your found solution, sounds quite sarcastic,
matter how much years or decades you are using this list or how much you
trying to post-justify your e-mail conversation.

But probably still stuck in the "I'll tell other people what I found"
Kiril A. (Guest)
on 2009-04-13 21:57
(Received via mailing list)
Who said I found the solution? For this particular server I migrated
it to Zend Server along with Apache as I could not justify spending
more time debugging or in that case down time and timeouts.

I would expect somebody from the UK to understand better English and I
am sure it is not my writing the problem for your not understanding.
Stop using "loop" metaphors or I you that much into your computer
world. Please, if anybody else feels as offended as Mr. Langhans, they
have my formal apologies.

On Mon, Apr 13, 2009 at 8:39 PM, Peter Langhans
Cliff W. (Guest)
on 2009-04-13 22:32
(Received via mailing list)
How about we let this drop.

SSSlippy (Guest)
on 2009-04-14 15:48
(Received via mailing list)
May I ask why php-fpm was not an option. It's an improved version of
fast cgi?

Posted at Nginx Forum:,976,1020#msg-1020
Michael S. (Guest)
on 2009-04-14 17:22
(Received via mailing list)
On Mon, Apr 13, 2009 at 11:37 AM, SSSlippy 
<removed_email_address@domain.invalid> wrote:
> May I ask why php-fpm was not an option. It's an improved version of fast cgi?

it's not really an "improved version of fastcgi". it's a more robust
fastcgi management layer bolted on to php w/ a couple extra
improvements and enhancements to php.
This topic is locked and can not be replied to.