[dev] Imp-2.2.6/php-4.0.6 memory problems ?
Anil Madhavapeddy
anil@recoil.org
Wed, 29 Aug 2001 14:04:29 +0100
On Wed, Aug 29, 2001 at 02:41:24PM +0300, Jarno Huuskonen wrote:
> Hi,
>
> I have (had) 50M memory limit on php.ini and after < 12hours (with about
> 400-500 users) imp-2.2.6 started to fail because of failed memory
> allocation. And after one apache (1.3.20) process (with php-4.0.6
> compiled in) failed to allocate memory it would go into an endless loop
> consuming all cpu ... I attached to one of these runaway process with
> gdb and the process was stuck in libc_free (called from
> Zend_hash_destroy (or something like that)). (The machine is a SMP Linux
> box (2.2.19 kernel) glibc-2.1.3).
>
> Has anybody else experienced memory/cpu problems with php-4.0.6 / imp ?
> My temporary solution is to put the memory limit to 512M and restart
> apache during the night. Any suggestions are welcome !! One idea I have
> is to use php as cgi instead of compiled module in apache ... How
> serious is the performance penalty ?
>
Try applying this patch:
http://demo.horde.org/devel/horde/chora/co.php/ports/www/php4/patches/patch-Zend_zend_alloc_c?rt=obsd&r=1.1&p=1
It's also available on the php4 website somewhere.
Anil