Alex Rivera | Logout

Prevent nginx 504 Gateway timeout using PHP set_time_limit()

Asked 2013-04-14T17:47:02.573
163

I am getting 504 timeouts message from nginx when my PHP script is running longer than usual. set_time_limit(0) does not seem to prevent that! Does it not work when running php5-fpm on nginx? If so, whats the proper way of setting the time limit?

Error:

504 Gateway Time-out
nginx/1.2.7
Edit
Report

1 Answer

0

Since you're using php-fpm you should take advantage of fastcgi_finish_request() for processing requests you know can take longer.

answered 2013-04-15T16:20:22.903

Your Answer