Prevent nginx 504 Gateway timeout using PHP set_time_limit()

后端 未结 10 1892
醉话见心
醉话见心 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:34

    Using set_time_limit(0) is useless when using php-fpm or similar process manager.

    Bottomline is not to use set_time_limit when using php-fpm, to increase your execution timeout, check this tutorial.

提交回复
热议问题