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.
Any ideas? My logs are innundated with this AcceptEx error but the server performs well and I havent noticed anything wrong besides this spam in my error logs.
I had run into the Win32DisableAcceptEx thing and tried it many times, but the combination with EnableSendFile off and EnableMMAP off finally did the trick.
Thank you thank you thank you thank you thank you.
I'm glad this solved your problem. It was a frustrating issue indeed.
info in another website.
what I am interested in knowing is does the directive win32disableaccepte
cause any memory leak in win2000 server?
I have seen some postings about Xp and 2003.
any info is appreciated
And until now I haven't found any solutions.
Before trying the config settings, I would like to know what kind of tests you performed to reproduce the error as for me it seems occurring randomly (even if I know it doesn't :-) ).
Thanks
So here I am and 24 hours after making the recommended changes I say... It worked.
Thank you. :)
Thanks you so much!!!!!!!!!!!!!!
Thank you for this post.
Looking months for a solution to the winnacept error (using apache 2.2.10 on a XP machine)
Today the problems got worse, for a newly added virtual hosts the index.php wouldn't load automatically, i had to specify the file in the URL. After implementing this fix all works as designed (just giving the site in the url does the job).
Great job!