Intensive PHP script failing w/ “The timeout specified has expired” error / ap_content_length_filter

后端 未结 10 1172
南方客
南方客 2020-12-30 10:50

Running a MySQL intensive PHP script that is failing. Apache log reports this:

[Wed Jan 13 00:20:10 2010] [error] [client xxx.xx.xxx.xxxx] (70007)
The timeou         


        
10条回答
  •  温柔的废话
    2020-12-30 11:21

    I suspect I'm getting the same error, updated for a later version of Apache (2.4.16):

    [Tue Aug 02 11:49:41.930884 2016] [core:error] [pid 28640] (70007)The timeout specified has expired: [client xxx.xxx.xxx.xxx:xxxxx] AH00574: ap_content_length_filter: apr_bucket_read() failed, referer: https://domain.com/script.php
    

    I was wondering why increasing max_execution_time in php.ini wasn't working.

    For me, the fix was simply increasing the Timeout directive in httpd.conf https://httpd.apache.org/docs/2.4/mod/core.html#timeout

    Timeout 900
    

    (Or in WHM -> Apache Configuration -> Global Configuration, as the case may be)

    This timeout applies to time between IO events. So even though the script was outputting data almost immediately, a long delay in the middle of the script's execution was causing the timeout.

提交回复
热议问题