Running windows 2003 server, apache2 and php 5.
memory_limit was 100M, but got this error when running a query against SQL server:
Fatal error: Allowed memory size of 314572800 bytes exhausted (tried to allocate 65536 bytes) in
As you can see got the memory size all the way up to 300M,
What is loosing me is that from 100 to 200 and finnaly 300M memory_limit,
(tried to allocate ...) was allways 65536 bytes.
Any idea why?
Apache got restarted every time.
I did not create the code behind this but it is using pattemplate and is quite old and badly programmed.
I could understand the script using more then a 100M cause by bad programming practice but not 300.
and the 65536 ..... ????
Hope someone can help put some light on this!
Thanks in advance
memory_limit = 300M Fatal error: Allowed memory size ????
Moderator: General Moderators
-
ericsimard
- Forum Newbie
- Posts: 2
- Joined: Thu May 15, 2008 7:00 pm
Re: memory_limit = 300M Fatal error: Allowed memory size ????
this means your terminating your php to solve the memory issues.Apache got restarted every time.
Most likely scenario
Than again, I cant be 100% sure, becoz i dont have access to the code.There is endless loop (for,while, do while) in the code.
The endless loop is assigning values to an array.
Since the endless keep assigning values to the array is keep getting bigger and bigger till it exhaust all the memory available.
Thats y the problem is still there, even tough you increased your memory limit.
If this is the case, try locate the endless loop.
Good Luck!
Re: memory_limit = 300M Fatal error: Allowed memory size ????
That means that:ericsimard wrote:Fatal error: Allowed memory size of 314572800 bytes exhausted (tried to allocate 65536 bytes) in
already_allocated_memory + 65536 > 314572800
Put some "memory-benchmark" lines inside your code and see what eats the memory.
There are 10 types of people in this world, those who understand binary and those who don't
-
ericsimard
- Forum Newbie
- Posts: 2
- Joined: Thu May 15, 2008 7:00 pm
Re: memory_limit = 300M Fatal error: Allowed memory size ????
Thanks for the reply, ill look for the memory_benchmark.
The infinit loop is unlikely because it use to work fine,
database got bigger and now it doesnt work anymore.
ill do some test and post back with some result!
thanks!
The infinit loop is unlikely because it use to work fine,
database got bigger and now it doesnt work anymore.
ill do some test and post back with some result!
thanks!