Re: More infos: "Memory limit is used for all scripts instead of one?"

From: Date: Thu, 28 Jun 2001 14:12:39 +0000
Subject: Re: More infos: "Memory limit is used for all scripts instead of one?"
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-58331@lists.php.net to get a copy of this message
At 17:00 28/6/2001, Swift wrote:
Hi Zeev! I tested a little around: 1) I dropped our leased-line, so there is no load. 2) I set the mem_limit to 12M. 3) Reboot 4) I used the 2 test-scripts as shown in one of my last mails. I called both scripts via wget at the same time. Each script should allocate 8M. 5) The wget-script then automatically saves the result and waits for 10 seconds. Then looping 4) and 5) 100 times. When I looked at the results I saw that in 40-50% of cases I will get the described out-of-mem-error!? And this can't be, because there was >400MB free memory. Do you have an idea what I can do now?
The 400MB have nothing to do with this error; You get it when you reach PHP's memory limit. Remember that PHP uses quite a lot of memory for its own purposes, other than the memory you use for your script. The data structures used by the engine, the modules, the symbol tables (environment, etc.) and so on and so forth - all consume additional memory. While I wouldn't estimate they take whole 4MB, it's not impossible. Zeev

« previous php.dev (#58331) next »