CGI quick cleanup
| From: | Sam Liddicott | Date: | Fri, 23 Nov 2001 10:35:19 +0000 |
| Subject: | CGI quick cleanup | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-71453@lists.php.net to get a copy of this message | ||
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