502 Bad Gateway

6 views
Skip to first unread message

Raphael Marot

unread,
Mar 26, 2012, 7:41:17 AM3/26/12
to ng...@nginx.org
Hi all,

I have a simple setup with Nginx in front Apache, under debian wheezy
(nginx for static content, apache for php)
Since the last Nginx update (1.1.17-2 via apt-get), every night after
daily crons i have a 502 error (bad gateway) until i reload apache.
Everything was fine before.
I tried to reload apache after nginx in the logrotate daily task, but
without effect.
In my logs i just have :

[error] 22332#0: *10804 connect() failed (111: Connection refused) while
connecting to upstream

Where should i look at?

Thanks!

_______________________________________________
nginx mailing list
ng...@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Chris

unread,
Mar 26, 2012, 7:42:19 AM3/26/12
to ng...@nginx.org
PHP is a common cause of such an error

Raphael Marot

unread,
Mar 26, 2012, 8:01:17 AM3/26/12
to ng...@nginx.org
Le 26/03/2012 13:45, mai...@securitylabs.it a écrit :

> Il 26/03/2012 13:41, Raphael Marot ha scritto:
>> Hi all,
>>
>> I have a simple setup with Nginx in front Apache, under debian wheezy
>> (nginx for static content, apache for php)
>> Since the last Nginx update (1.1.17-2 via apt-get), every night after
>> daily crons i have a 502 error (bad gateway) until i reload apache.
>> Everything was fine before.
>> I tried to reload apache after nginx in the logrotate daily task, but
>> without effect.
>> In my logs i just have :
>>
>> [error] 22332#0: *10804 connect() failed (111: Connection refused)
>> while connecting to upstream
>>
>> Where should i look at?
>>
> Look at Apache's logs. It seems that apache does not restart correctly
> after che log rotate, and a manual restart fix it. The error tells you
> that nginx can't communicate with apache.

>
> _______________________________________________
> nginx mailing list
> ng...@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Thanks!
Indeed I have an error in my apache log.
seg fault or similar nasty error detected in the parent process

It is definitely php related and has nothing to do with Nginx.
I think i uninstalled a php module which is still called in the php.ini,
and maybe this is the cause...

Reply all
Reply to author
Forward
0 new messages