问题
The production server has CentOS 6.4 with Plesk 11.0.9. It is a dedicated server.
Server configuration:
* max_execution_time
is set to 500 from Plesk and it shows up correctly in phpinfo
Problems:
* I get 500 Internal Server Error
after 30 seconds of running any script
Is there any way I get a workaround this problem?
LE:
* the script I want to do this downloads from a remote location a file to user's browser. It might require even hours to complete the operation (for very slow internet connection clients). I really need this. And one more thing, the user must not see the source url.
回答1:
I think you run Fast CGI. The CGI process has a maximum execution time. In fastcgi its the idle-timeout. After that you get an 500 Error because the backend is not responding in that time.
I don't know which module you use. But normally you can set the idle-timeout in your configuration.
mod_fastcgi idle timeout not work
来源:https://stackoverflow.com/questions/20146184/i-get-500-internal-server-error-after-30-seconds-of-running-a-script