Debugging 504 Gateway Timeout and its actual cause and solution

itpp2012 nginx-forum at
Mon Jan 4 14:34:45 UTC 2016

Keyur Wrote:
> If its poorly written code then I need to inform the developer that
> 504 is happening due to issue in php code and not due to nginx or
> php-fpm and if its due to Nginx or Php-fpm then need to fix that.

How many php master/slave processes are running generally and how many when
you get 5xx errors?
It is best to define and use a pool (upstream) for php.

Posted at Nginx Forum:,263842,263845#msg-263845

More information about the nginx mailing list