Answer the question
In order to leave comments, you need to log in
Error 500 when waiting for a long time, how to fix?
Hello.
I have a long polling (POST) request in my script, after 90 seconds of the script's operation, "500 - Internal Server Error" is returned.
Presumably due to the long script operation, but the fact is that everywhere, including php.ini, it is written:
max_execution_time = 300
max_input_time = 300
Any ideas where else there could be a limitation?
There are no php.ini calls and restrictions in php files, just like in .htaccess
Answer the question
In order to leave comments, you need to log in
You can find where the time limit is as follows:
1. print php_info() to the web, or php5-fpm -i to the console.
2. Find all the restrictions for 90 seconds in the options - there can be a lot of restrictions (for example, session life_time, suddenly, but it can lead to this if it is small)
3. Try to change one at a time and find out what's wrong by trial and error.
Most likely it's not about 90 seconds in php. You need to look at the nginx/apache/php error log and see the obvious error that has occurred. It can be anything, but judging by the fact that "500 - internal server error" I smell that Apache has some kind of limits / errors.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question