atom feed20 messages in ru.sysoev.nginxRe: Nginx + php-fpm "504 Gateway Time...
FromSent OnAttachments
rahul286Sep 6, 2010 10:38 pm 
Rahul BansalSep 6, 2010 11:27 pm 
Rahul BansalSep 6, 2010 11:27 pm 
Igor SysoevSep 6, 2010 11:31 pm 
Rahul BansalSep 6, 2010 11:40 pm 
Igor SysoevSep 6, 2010 11:46 pm 
Reinis RozitisSep 7, 2010 3:33 am 
Rahul BansalSep 7, 2010 9:03 am 
Reinis RozitisSep 7, 2010 9:56 am 
minaevSep 8, 2010 2:47 am 
Jérôme LoyetSep 8, 2010 2:54 am 
rahul286Sep 8, 2010 2:58 am 
minaevSep 8, 2010 3:29 am 
rahul286Sep 8, 2010 3:32 am 
Rahul BansalSep 8, 2010 4:01 am 
minaevSep 8, 2010 4:15 am 
Reinis RozitisSep 8, 2010 4:18 am 
Jérôme LoyetSep 8, 2010 5:16 am 
Michael ShadleSep 8, 2010 10:20 am 
net999Apr 14, 2011 1:13 pm 
Subject:Re: Nginx + php-fpm "504 Gateway Time-out" error with almost zero load(on a test-server)
From:Reinis Rozitis (r@roze.lv)
Date:Sep 7, 2010 3:33:20 am
List:ru.sysoev.nginx

After debugging for 6-hours - I am giving this up :|

First of all since this is clearly a php-fpm issue you should have checked (enabled) the php-fpm logs.

In your php-fpm.conf there should be lines:

error_log = /some/path/error.log log_level = notice

and for debugging / performance purposes its good to add:

request_terminate_timeout = 60s request_slowlog_timeout = 20s slowlog = /some/path/slow.log

This way php-fpm will start to log/backtrace (print the codeparts in logfile) of requests which take longer than 20 seconds (you can adjust by your own needs) and kill those taking longer that minute.

It should pretty much give you an idea what is happening and/or slowing down the php to level it hangs up (the typical case is usually some code involving sockets or db backends).

rr