Prevent nginx 504 Gateway timeout using PHP set_time_limit()

后端 未结 10 1890
醉话见心
醉话见心 2020-11-29 15:58

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

10条回答
  •  感动是毒
    2020-11-29 16:43

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

提交回复
热议问题