Re: Command-line PHP script CPU usage goes sky-high, stays there--why?
| From: | Jochem Maas | Date: | Tue, 11 Dec 2007 00:48:20 +0000 |
| Subject: | Re: Command-line PHP script CPU usage goes sky-high, stays there--why? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265645@lists.php.net to get a copy of this message | ||
Jim Lucas wrote:
> Tom Rogers wrote:
>> Hi,
...
> Also, make sure you are not using an array that you are not re-initializing through each
> iteration
> of the loop. If the array keeps getting bigger, PHP might $*%& on itself. Always
> re-initialize
> arrays to clean them up.
even then he may still have creeping memory ... in which it might be possible to have a mother
process that
spawns and watchs a child process .. the child process is the actual deamon, the child could then
keep a track
of it's own memory usage and then kill itself when it gets too big ... the mother in turn would
automatically
spawn a new child deamon process upon seeing it's child has committed suicide.
does that make sense?