I have been running Drupal (4.7.3) quite a while on my WAMP (Windows, Apache, MySQL, PHP - all latest versions) and have noticed that I have a tremendous memory issue. I recently installed the sysinternals process explorer and took a look at my http.exe performance and was shocked that it was feeding on 180MB Ram. I restarted the process, kept the performance graph window open and opened my drupal home page with a browser and then kept hitting refresh every couple of seconds after the page had fully loaded. Then I took a look at my open performance window and did not know wheather to laugh or to cry...
The memory had kept at a steady rate of more or less 15MB per refresh hit.
I attached the screenshot of the graph. I have no clue on why this is happening. PHP? MySQL? Apache? Drupal?
Could anyone give me a hand on figuring it out and solving the issue...?
Thanks in advance,
Phil
----
Screenshot: drupal-wamp-memory-issue.jpg
Comments
Apache and MySQL will grow some cache entries
Hello Phil,
Does your refresh display new data?
Apache and MySQL cache lists including file directories and previous query results. If you are continually requesting new data then the software will expand cache entries until you hit limits defined in their configuration. The growth will stop soon if your Apache and MySQL are configured the right way for your machine.
My Apache, under Windows 2000 Pro, has two lots of 15 MB and MySQL has one lot of 40 MB all for a default page that has a few lines of static HTML.
Is your graph showing only httpd.exe? Apache 1.3 or 2? Is all the Apache maintenance up to date?
Does your Web page show a random image? Apache could be caching the random images in the file cache.
We need a little more information about the page you are refreshing.
Peter
petermoulding.com/web_architect
petermoulding.com/web_architect
Clarifications
Apache 2.2.3
MySQL 5.0.24
PHP 5.1.5
Drupal 4.7.3
The page I keep refreshing is http://filiptc.homeip.net and it only has one random image which should not take more than 200kB each time... The graph only shows the httpd.exe. The MySQL graph has a steady private bytes amount of 141MB (which is pretty high aswell though) but does not keep growing at each request like apache's does.
Phil
Weird
Hello Phil,
I cannot find anything that comes close, in Windows 2000 Pro, to the memory usage you get in XP. I am using the standard task manager and neither current or peak usage is that high.
There are several references to memory problems in XP with both PHP and Perl under Apache when used as modules instead of CGI. The cure seems to be to reinstall with the latest Apache and PHP.
Note that some releases of Apache need specific releases of PHP. As of last week, the latest Apache needs an updated PHP. I had to switch to a PHP snapshot to get compatibility.
petermoulding.com/web_architect
petermoulding.com/web_architect
If you mean the
If you mean the apache2php5.dll handler, i did get the last version. I have no major error log errors except ones which I don't think have much to do with the matter discussed, but anyways, here they are:
Fix the errors.
The errors look like they should be fixed before worrying about memory.
If PHP runs as a module then crashes, the cleaning up of memory may not be complete. The CGI version completely recreates everything for every page request but the module and SAPI version try to reuse stuff. The memory clean up varies from Apache 1 to 2, from operating system to operating system and from release to release of PHP. Fix the crash then see if the memory problem exists.
The $cache class and gallery2 might have code to reload stuff for every page view and their lists of stuff to reload might be growing with each page view. You want a clean release of both so that there are no error messages. If the problem continues, check the Web sites for both components and search for anything to do with memory.
petermoulding.com/web_architect
petermoulding.com/web_architect
Problem with apache's DisableAcceptEx directive
Apache and windows are no good friends. At least that's the conclusion I'm pulling out of this. If you use it in Windows NT (or NT based like XP) out of the box you have pages of error logs full of "winnt_accept: Asynchronous AcceptEx failed". If you use the DisableAcceptEx directive directive in apache's .conf you get what I got (HUGE RAM useage and apache crashes every couple hours)...
I'm deciding to migrate to linux in order to solve the issue and meanwhile am removing the DiableAcceptEX directive since I prefer huge logfiles to no ram... :S
Hope this info is useful.
Phil
Buggy stack
It seems your windows installation is using a buggy Winsock 2 implementation (Virusscanner, VPN, Firewall, pre SP1 (?)) somewhere. If you are going to migrate, why not try to repro on a clean windows XP SP2 install as Apache works fabulously on it.
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.
Apache says
I use the Apache 2 defaults on Windows 2000 Pro/Server and never get any problems. There are two httpd.exe sitting at 16MB. The system does not run any of the known problem products:
petermoulding.com/web_architect
petermoulding.com/web_architect
Clarification
Ok, maybe I wasn't clear enough. I am posting this after months of analysis and research throughout the web. Google it... you will see loads of peolple who have the 'asyncronous acceptex failed' issue (withouth firewalls, antiviruses, etc) and apply the DisableAcceptEx directive get the 'unable to allocate X bytes' every now and then accompanied with an apache restart.
Maybe only-XP issue?
Regards,
Phil
Windows and apache issue....
Windows and apache issue....
Bumping a five and a half
Bumping a five and a half years old thread!! That's gotta be a new record!