Re: PHP (anti) crash policy?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 10/01/2004 10:29 AM, Olaf Van Der Spek wrote:
So what went wrong with this bug report?

http://bugs.php.net/bug.php?id=30153

It's marked as bogus, although it provides a script to reproduce the crash.



That is not a crash. Your script making a PHP function request 600MB of memory. Since it exceeds the configured memory limit, there is no way to recover from memory exhaustion and the script just exits cleanly. It does not crash the current process, even less the Web server.


So Apache restarts just because it thinks that's funny?

FATAL:  erealloc():  Unable to allocate 603602944 bytes
[Sun Sep 19 16:11:16 2004] [notice] Parent: child process exited with
status 1 -- Restarting.

I was not aware that memory allocation failures could make PHP to exit its process but since it seems intentional there must be a reasoning behind that for which I am not the person that should explain. Maybe the reason has to due to the fact that when memory allocation fails, PHP allocation code can't be certain about memory integrity.


Anyway, 600MB memory allocation is not normal in a typical memory application. If it is normal in your application, why don't you just raise the memory limit setting? It would avoid making PHP exit.


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux