[Toolserver-l] protip: i/o and infinite loops in php

Daniel Schwen lists at schwen.de
Wed Jan 23 17:02:00 UTC 2008


> why not: because if the i/o fails, your script will run forever, using
> 100% cpu, doing nothing.
Mh, yeah, I had a similar problem with my scripts. No infinite loop,  but a 
blocking write to a fifo, as my fifo listener process was killed off. 
I wasted lots of memory with my stale php processes. Sorry about that!
I fixed it by adding checks for the fifo listener (using pid files) and 
aborting the php script if the write would be blocking.
-- 
[[en:User:Dschwen]]
[[de:Benutzer:Dschwen]]
[[commons:User:Dschwen]]



More information about the Toolserver-l mailing list