I've been chasing a problem with Apache for the past several months now that I finally was able to solve last night. After upgrading to Apache 2.2.6 and installing ColdFusion 8, I started having intermittent problems with images not loading on pages, very slow page loads, or page requests simply hanging. At first, I thought the problem was a ColdFusion Apache connector problem, because I could only make it happen when I was running Apache with ColdFusion. After a long and tedius testing and troubleshooting process, I was finally able to narrow the issue to Apache itself, and not the JRun connector for ColdFusion.
I caught a big break when I saw the following error message in my logs:
I had seen the same error before a few months back, but Googling the error didn't produce anything useful in past attempts. Last night, for whatever reason, I hit pay dirt. This blog entry put me on the right track. I'm not sure why I didn't find it before as it was posted in 2006, but that really isn't important.
The blog post suggests that the error is caused by a conflict between one or more programs (anti-virus, firewall, virtualization, or vpn) and AcceptEx(), and goes on to say that disabling it using the win32DisableAcceptEx directive should solve the problem. Curious, I googled win32DisableAcceptEx and found this in the Apache docs:
Here's the relevant section from my Apache 2.2.6 httpd.conf file that needed to be changed:
Although the Apache documentation doesn't mention the EnableMMAP and EnableSendfile directives, I found that I had to disable them as well (as per the first blog post I found). To do so, you'll notice that I simply had to uncomment the EnableMMAP off line as well as the EnableSendfile off line. The win32DisableAcceptEx line is a little less obvious. It isn't included anywhere in the default httpd.conf file, but it was listed in the Apache docs, so I just added the directive after the EnableSendfile off.
After a quick restart of the Apache service, I ran through my battery of tests across all of my instances and wouldn't you know it, problem solved!
Glad to know I'm not the only person who has run into this. In my case, it's only happened on my laptop - everyone else in my company is running the same config on slightly different machines with no problems, and all of our dev/qa/prod servers seem to be ok as well.
I'm not sure what about my specific config is causing the problem, but I'm at least glad to have a solution after banging my head against the wall.
Looking at the eror log I found:
(OS 121)The semaphore timeout period has expired. : winnt_accept: Asynchronous AcceptEx failed.
(OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.
Added the directives to my conf file as described in the article.
Things seem to be fine now. Thanks for posting.
I'm glad this helped you out. It was a real PITA to track down and was driving me nuts for quite some time.
I'll let you know if it does. I'm using it under load to serve static images for a site that gets over 250k page views per day. Been running it about 20 minutes now and apache's RAM usage appears to have stabilized.