Since my question is getting longer and longer, I decide to re-write the whole question to make it better and shorter.
I run my website on dedicated server with 8GB
this happened to me a few days ago. I did a fresh installation and it still happened. as far as everyone sees and based on your server specs. most likely it is an infinite loop. it could be not on the PHP code itself but on the requests made to Apache.
lets say when you access this url http://localhost/mysite/page_with_multiple_requests
Check your Apache's access log if it receives multiple requests. trace that request and check out the code that might cause a 'bottleneck' to the system (mine's exec() when using sendmail). The bottleneck im talking about doesn't need to be an 'infinite loop'. It could be a function that takes sometime to finish. or maybe some of php's 'program execution functions'
You might need to check ajax requests too (the ones that execute when the page loads). if that ajax request redirects to the same url
e.g. httpx://localhost/mysite/page_with_multiple_requests
it would 'redo' the requests all over again
it would help if you post the random lines or the code itself where the script ends maybe there is a 'loop' code somewhere there. imho php won't just call random lines for nothing.
http://blog.piratelufi.com/2012/08/browser-sending-multiple-requests-at-once/
For my case, this error was triggered because of a huge select query (hundreds of thousands of returned results).
It arose immediately after adding millions of records in my Database to test the scalability of WordPress, so it was the only probable reason for me.
Fatal error: Out of memory (allocated SOLVED
i had similar problem, for months no solution. finally i was checking in one of the apache folders i.e(\apache\conf\extra) i came across this file that controls the memory allocation of apache. the file name is httpd-mpm in that file you are to increase the MaxMemFree which is set 2048 to something higher, i took mine to 10000 for the first MaxMemFree (IfModule !mpm_netware_module) then made the second one MaxMemFree to 5000 IfModule mpm_netware_module.
These solved my problem. hope it helps
From the profiler output file I've noticed a couple of things which I did not like/trust much and would look into these:
Apart from not knowing the meaning of the output numbers to detect an anomaly or how PHP scripts work..., Is this not a problem? Having an include to the same main.ph file, which looks like a recursive thing?
2121 fl=D:\www\football\views\main.php
2122 fn=include::D:\www\football\views\main.php
Noticed the file D:\www\football\views\main.php
is making use of some string functions several times, I guess it is calling these functions on the data returned by your query:
strlen
substr
strtotime
If, like in the C language, these functions require strings be null
terminated or some other end of string terminator to avoid memory problems, I would look at the strings returned by your query.
Can you post the url of your website?
Hey I also got the same problem on my server. I just changed the following things :
change php.ini
to...
memory_limit = 128M
and add to httpd.conf
RLimitMEM 1073741824 2147483648
and restart apache & i removed the error :
Try to run php over fcgid, this may help:
These are the classic errors you will see when running PHP as an Apache module. We struggled with these errors for months. Switching to using PHP via mod_fcgid (as James recommends) will fix all of these problems. Be sure you have the latest Visual C++ Redistributable package installed:
http://support.microsoft.com/kb/2019667
Also, I recommend switching to the 64-bit version of MySQL. No real reason to run the 32-bit version anymore.
Source: Apache 2.4.6.0 crash due to a problem in php5ts.dll 5.5.1.0