This is a discussion on how to automatically terminate a hanging php process within the PHP General forums, part of the PHP Programming Forums category; I am running a php site on a shared host environment. They have 20 max concurrent process limitation. Recently, I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am running a php site on a shared host environment. They have 20 max
concurrent process limitation. Recently, I am having issue of some phpcgi process just hanging there and my site run out of process quota. the time limitation in php.ini is 180 seconds. However, those php just doesn't quit after 180 seconds, I check ps result. seems all those process just consume 0 seconds of CPU(which explains why it didn't get termiated?) It just didn't finish properly. what kind of things will cause process stay there? if I didn't close mysql connection, not free up result, will that cause it? Is there anyway I can place a automatic timeout mechanism in this situation. some kind of time signal after 30 seconds and just exit the process. i tried pcntl_alarm but seems it need declare(ticks=1) to work.... anyone have any suggestions? thanks so much!, this thing is driving me crazy.... |
![]() |
| Thread Tools | |
| Display Modes | |
|
|