PHP script times out at 5 minutes despite apache timeout and set_time_limit()
I have a php script that needs to run for a while. I've increased my php time limit and increased the apache timeout directive but not matter how high I set them, something times out at 5 minutes exactly. It ends up with a 503 Service Unavailable error.
It seems like it is not PHP. I've registered a shutdown function that will send an email, but that never gets sent. I've also set it to ignore_user_abort(true), so whatever is killing it is doing so very forcefully. I thought increasing the apache timeout would do it for sure, but to no avail.
I realize this might not be a cPanel question, but I'm wondering if I've overlooked a setting or something.
-
Hello, Do you notice any output to /usr/local/apache/logs/error_log when this happens? What PHP handler are you using for this account? Is PHP-FPM enabled on this domain name? Thank you. 0 -
Using Apache with lsapi - And it is an issue with lsapi_backend_max_process_time defaulting to 300 even though the docs say 3600. Thanks, you put me onto it! 0 -
I'm happy to see you were able to resolve the issue. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
3 comments