Welcome! Log In Create A New Profile

Advanced

Re: fastcgi causing 502 errors? [was: alternating 404 and 200]

Jeffrey 'jf' Lim
September 03, 2009 04:10PM
2009/9/4 Nuno Magalhães <nunomagalhaes@eu.ipp.pt>

> I'm running nginx/0.8.10 and PHP 5.2.10 on Debian Sid with a
> 2.6.30-1-amd64 kernel. This is my desktop machine, mainly for testing
> and screwing around with configurations (although screwing up also
> comes to mind). I've recently upgraded my system through Debian's
> apt-get dist-upgrade, which reset my fastcgi_params.
>
> Nginx spawns two worker processes, php-fastcgi spawns 4, nginx is the
> only http server i'm running, i have no proxies or anything.
>
> If i have an URL like http://localhost:8080/site01/file.php?var=param
> and hit the reload button constantly, i'll get a bunch of normal
> replies (200), followed by a bunch of 502s, then 200, then 502, ...
> The interval is about the same, maybe a second or so.
>
> If i use http://localhost:8080/simplefile.html for a simple lorem
> ipsum html file i sometimes get the 502 in the first few reloads, but
> after that it's just 200.
>
>

how heavy is your '/site01/file.php' script? (btw, I dont see any reference
to it in your 502 log file)

I would imagine that the cause would be because nginx does not queue
connections. And you have only a limited number of fastcgi processes (or how
are u running your fastcgi?) Therefore when they are busy, and cannot accept
connections, you will get a reset (i dont know how u're setting up your
fastcgi, but!). The html without php gets cached very easily - therefore
it's 200s all the way after any initial problems.

-jf


--
In the meantime, here is your PSA:
"It's so hard to write a graphics driver that open-sourcing it would not
help."
-- Andrew Fear, Software Product Manager, NVIDIA Corporation
http://kerneltrap.org/node/7228
Subject Author Posted

fastcgi causing 502 errors? [was: alternating 404 and 200]

Nuno Magalhães September 03, 2009 04:00PM

Re: fastcgi causing 502 errors? [was: alternating 404 and 200]

Jeffrey 'jf' Lim September 03, 2009 04:10PM

Re: fastcgi causing 502 errors? [was: alternating 404 and 200]

Nuno Magalhães September 03, 2009 06:28PM

Re: fastcgi causing 502 errors? [was: alternating 404 and 200]

Jeffrey 'jf' Lim September 03, 2009 09:42PM

Re: fastcgi causing 502 errors? [was: alternating 404 and 200]

Nuno Magalhães September 04, 2009 10:53AM

Re: fastcgi causing 502 errors? [was: alternating 404 and 200]

vesperto September 07, 2009 10:34AM

Re: fastcgi causing 502 errors? [was: alternating 404 and 200]

vesperto September 08, 2009 06:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 55
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready