RE: [PHP-DEV] CGI quick cleanup
| From: | Sam Liddicott | Date: | Fri, 23 Nov 2001 10:41:45 +0000 |
| Subject: | RE: [PHP-DEV] CGI quick cleanup | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-71454@lists.php.net to get a copy of this message | ||
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:sam.liddicott@ananova.com]
> Sent: 23 November 2001 10:35
> To: php-dev@lists.php.net
> 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: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>