I have noticed the same problem with a scipt that used a very large array
(~160 MB). The script run time was around 35 seconds, while it took over 4
minutes to shut down! Same amount of time was used in trying to unset() the
array.

Edin
----- Original Message -----
From: "Sam Liddicott" <[EMAIL PROTECTED]>
To: "Sam Liddicott" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, November 23, 2001 11:41 AM
Subject: RE: [PHP-DEV] CGI quick cleanup


> I should add that without the kill -5 it takes longer for the script to
> finally exit than it took to execute!
>
> Sam
>
> > -----Original Message-----
> > From: Sam Liddicott [mailto:[EMAIL PROTECTED]]
> > Sent: 23 November 2001 10:35
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DEV] CGI quick cleanup
> >
> >
> > I am using PHP for a system script to import TV listings to a
> > database.
> >
> > It works well but creates 20,000  to 30,000 hash elements with various
> > relationships and it *seems* to take exponentially longer for
> > the script to
> > actually stop running after it reaches the "exit" statement
> > the more items
> > there are.
> >
> > I also note that even though max execution time is set to zero and the
> > script runs for a long time, I still get a max-execution
> > error at 30 seconds
> > after the script has been trying to exit (although the script
> > runs for many
> > minutes).  30 seconds is the timeout in the php.ini which I
> > override with
> > ini_set.
> >
> > I think this long shutdown time is PHP's per-page cleanup
> > freeing all the
> > objects, which is not so important if running as a CGI.
> >
> > Currently I am quitting with
> > posix_kill(posix_getpid(),5)
> > as it is pretty quick
> >
> > but I wondered if the per-page cleanup which is only
> > important when running
> > as an apache module could be disabled in cgi mode.
> >
> > Sam



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to