Real max_execution_time for PHP on linux

前端 未结 3 1033
忘掉有多难
忘掉有多难 2020-12-19 12:03

According to the documentation:

max_execution_time only affect the execution time of the script itself. 
Any time spent on activity that happens outside the e         


        
3条回答
  •  长情又很酷
    2020-12-19 12:38

    This is an old and answered question. But for the sake of helping others, I wanted to point out the request_terminate_timeout php-fpm option. If you're using PHP-FPM, it is most likely what you need.

    If set, this option allows you to tell PHP-FPM to kill a request after N seconds, regardless of what PHP does.

    See http://php.net/manual/en/install.fpm.configuration.php#request-terminate-timeout for details.

提交回复
热议问题