502 Bad Gateway - Nginx + PHP-FPM

845 views
Skip to first unread message

intel352

unread,
Sep 14, 2010, 5:08:46 PM9/14/10
to highload-php-en
I've noticed a curious issue recently on my server.

I am running Ubuntu 10.04, Nginx, and PHP-FPM using Brian Mercer
method.

I recently updated the server, and then also updated my PHP-FPM config
to allow dynamic child processes instead of just static.
I've noticed now that *one* of my domains (all my domains within the
same server and same worker group) will periodically hit a 502 Bad
Gateway error, which remains up for that domain, while other sub
domains and other websites hosted on my server, have no problem.

Restarting PHP-FPM resolves the issue.

What puzzles me is, why would it toss this error just for *one*
domain, not the rest?
I'm assuming this is actually not a problem in Nginx, but moreso in
PHP-FPM, regarding the number of processes, requests, etc?

Here's a sample of log output:
Sep 14 15:24:55.942487 [NOTICE] [pool www] child 29911 started
Sep 14 15:53:45.640790 [WARNING] [pool www] child 29908 exited on
signal 11 SIGSEGV after 1730.763352 seconds from start
Sep 14 15:53:45.644145 [NOTICE] [pool www] child 29980 started
Sep 14 16:15:51.861570 [WARNING] [pool www] child 29907 exited on
signal 11 SIGSEGV after 3057.712053 seconds from start
Sep 14 16:15:51.865127 [NOTICE] [pool www] child 30041 started


All feedback appreciated!

Thanks!

Jérôme Loyet

unread,
Sep 14, 2010, 5:36:52 PM9/14/10
to highloa...@googlegroups.com
2010/9/14 intel352 <inte...@gmail.com>:

Is there more revelant logs ?

Do you know how to reproduce the problem ?

If you can, change log level to debug and get a core dump and send us
a backtrace.

You can maybe test the patch attached to the following bug report:
http://bugs.php.net/bug.php?id=52501
it should correct a bug which is maybe similar.

++ jerome


> All feedback appreciated!
>
> Thanks!
>

intel352

unread,
Sep 14, 2010, 6:27:30 PM9/14/10
to highload-php-en
Interesting bug report. I don't see any (recent) reports of mail
errors.
I've enabled the catch worker output setting, and enabled debug level
logs, so hopefully that will give better log information.

I've checked the PHP script's local error_log, as well as the website
Nginx log, and the server php5-fpm.log, nothing actually helpful in
any of the logs.

Hopefully whatever is causing this, will reoccur within the next 12-24
hours. Over the past 2 days, it's occurred each day, so it should re-
occur again by tomorrow.

Thanks!

On Sep 14, 5:36 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
> 2010/9/14 intel352 <intel...@gmail.com>:

Jérôme Loyet

unread,
Sep 15, 2010, 2:22:05 AM9/15/10
to highloa...@googlegroups.com
2010/9/15 intel352 <inte...@gmail.com>:

> Interesting bug report. I don't see any (recent) reports of mail
> errors.
> I've enabled the catch worker output setting, and enabled debug level
> logs, so hopefully that will give better log information.
>
> I've checked the PHP script's local error_log, as well as the website
> Nginx log, and the server php5-fpm.log, nothing actually helpful in
> any of the logs.
>
> Hopefully whatever is causing this, will reoccur within the next 12-24
> hours. Over the past 2 days, it's occurred each day, so it should re-
> occur again by tomorrow.

does it happen every day at the same time ? Is there a cron or
something which reload FPM ?

Jonathan Langevin

unread,
Sep 15, 2010, 10:19:57 AM9/15/10
to highloa...@googlegroups.com

Dunno if it's occurring at a specific time, but.seems most common from morning to noon.  If any from exists, it's hourly.

Nothing reloading fpm.

It hasn't errored out yet today so far.

On Sep 15, 2010 2:22 AM, "Jérôme Loyet" <m...@fatbsd.com> wrote:

2010/9/15 intel352 <inte...@gmail.com>:

> Interesting bug report. I don't see any (recent) reports of mail
> errors.

> I've enabled the catc...

does it happen every day at the same time ? Is there a cron or
something which reload FPM ?


>
> Thanks!
>
> On Sep 14, 5:36 pm, Jérôme Loyet <m...@fatbsd.com> wrote:

>> 2010/9/14 intel352 <in...

Reply all
Reply to author
Forward
0 new messages