PHP Fatal error: Maximum execution time of 30 seconds exceeded in Unknown on line 0
In the logs you receive such records "PHP Fatal error: Maximum execution time of 30 seconds exceeded in Unknown on line 0" and the server hangs on ssh/ftp is not comes but ping responds. Stalkivalsa if anyone with such miracles? Server Apache/2.2.3 (CentOS), PHP 5.3.10
I can assume that you have the script falls into recursion, sticks, Apache starts magically to forkutsa to meet the demands of new processes as well stick, the system loses epochal resources (memory and CPU time), many things get in the swap, other processes are not capable such as ssh, ftp due to the absence of resources. Apache also stands as fork stops working. After some time the script is killed by the Apache-fork for max_execution_time, resources returns, the sun becomes brighter, the sky bluer, ssh faster. Something like that. Total: very heavy script is detected.
Dewayne.Russel73 answered on October 8th 19 at 03:33
Complement the previous post, the distinguished Aco
Judging by the symptom really the system is terribly lacking resources.
— Not the fact that if it worked before then there is no recursion. Error in logic + incorrect information = infinite recursion.
What I can advise:
— Play around with memory_limit. It can help to find the "weak link" because recursion is usually cherevato eating system resources
And of course brutal porn the debug in the test envoirment. The only way you will be able to understand the logic of someone else's code and find the bottleneck
greyson_Dooley answered on October 8th 19 at 03:35
View more access log that preceded the fall, which requests. Perhaps it will certainly stimulate some thought.
It is important to understand the periodicity of the problem. This is due to the number of users (resp. lack of resource) or by entering a search robot or rare but "accurate" challenge full of hard functions (for pericoloso cache import large amount of data, etc.)
eloise_Hahn answered on October 8th 19 at 03:37
Try set_time_limit(0);. If does not help, then it could be infinite recursion.
Anthony.Considi answered on October 8th 19 at 03:39
Thanks to all of you, go debit. Put xDebug
antonette.Gislas answered on October 8th 19 at 03:41
If you use apache, we first see the output of top load, the second — place mod_status and check which queries are hanging. Then we can see why. Also, you can log the execution time of queries (Apache allows it)
austen_Bernier answered on October 8th 19 at 03:43
"Unknown on line 0" most likely indicates that the script is encoded by Zend\ioncube or similar. First look at the script (its name is displayed in the log, let the entry in the error_log).