After running ps aux | grep php, I found about 10 php scripts ran by cron that have started over a week ago and are hanging.

Each script usually take 40 seconds to complete.

I have set ini_set('max_execution_time', 60) hoping it would terminate after 60 seconds.

How can I diagnose what is happening?

Thank you


Use tools like strace, ltrace to see what a particular hanged script process is doing. Also lsof if it's stuck doing something on a fd (like a blocking select).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.