Subject: PHP running out of memory. How can I fix that?
To: NetBSD Users Mailing List <netbsd-users@NetBSD.org>
From: Gilles Gravier <Gilles@Gravier.org>
List: netbsd-users
Date: 05/25/2007 12:45:38
Hi!

So my web server (Apache 1.3) calls PHP scripts... and things start 
going wrong when PHP runs out of memory :

[Fri May 25 10:58:09 2007] [error] PHP Fatal error:  Allowed memory size 
of 33554432 bytes exhausted (tried to allocate 1440001 bytes) in 
/usr/pkg/share/swisscenter/base/image.php on line 402

Any suggestion as to how to fix that?

Putting ulimit statements somewhere? But where? I've tried in the 
rc.d/apache scripts... that doesn't work.

I've tried replacing /usr/pkg/bin/php with a wrapper script, but to no 
effect (in any case, Apache loads a library, if I remmeber well)...

So I'm out of ideas and open for suggestions... any available? :)

Thanks in advance,
Gilles.
-- 
/*Gilles Gravier*/ *=* *Gilles@Gravier.org* <mailto:Gilles@Gravier.org> 
*=* *http://www.gravier.org/*
ICQ : *77488526* 
<http://www.icq.com/whitepages/about_me.php?Uin=77488526> * || *MSN 
Messenger : Gilles@Gravier.org <http://members.msn.com/Gilles@Gravier.org>*
*Skype : ggravier <callto://ggravier>* || *Y! : ggravier 
<http://profiles.yahoo.com/ggravier> || AOL : gillesgravier 
<aim:goim?screenname=gillesgravier>
PGP Key ID : *0x8DE6D026* 
<http://pgp.mit.edu:11371/pks/lookup?search=0x8DE6D026&op=index>
My Last Known Position / Ma Derniere Position Connue 
<http://www.gmap-track.com/user.php?user=ggravier>
"Chastity is its own punishment." (/Solomon Short/) [/David Gerrold/]
"De toutes les aberrations sexuelles, la chasteté est la plus 
aberrante." [Anatole France]