Apache 2.4 running on Windows hangs when Internet Explorer 10/11 is used to acces pages on it.
I had a very reproducible scenario: Only the first request to Apache coming from IE would work, all other subsequent requests would hang, in all browsers. As long as I did not use Internet Explorer there did not seem to be a problem, but once that was used everything would hang until Apache was restarted. Strangely enough after I had applied the fix (see below) I reverted it to do some more testing but was not able to reproduce the problem anymore…
I am not sure of these, just describing the setup I was using when I encountered these problems. If you know more, please leave a comment.
- Running on Windows 7
- Using Apache 2.4.6
- VMWare network drivers installed (see explanation for why this might be relevant)
- Using an experimental 64-bit build of PHP 5.5: php-5.5.5-Win32-VC11-x64
- Using Internet Explorer 11
- Using Twitter Bootstrap, MySQL
It seems that I was being hit by an issue with Apache’s Multi-Processing Module optimized for Windows NT. See references below for some sources that describe this problem and the fix.
Add this configuration snippet to
Apache24/conf/httpd.conf (bottom of file seems fine):
# Apparently this fixes an issue with Apache 2.4.6 on Windows hanging
# when serving requests from Internet Explorer 10/11.
# see https://stijndewitt.wordpress.com/2014/01/10/apache-hangs-ie11/
AcceptFilter http none
AcceptFilter https none
From the Apache docs about
This directive enables operating system specific optimizations for a listening socket by the Protocol type.
noneuses accept() rather than AcceptEx() and will not recycle sockets between connections. This is useful for network adapters with broken driver support, as well as some virtual network providers such as vpn drivers, or spam, virus or spyware filters.
- Zomgrei – The Blog of Tim Hosey: Internet Explorer 10/11 Causes Hangs or Crashes on Apache 2.4
- Astute Logic: IE freezes when requesting an EasyPHP/Apache hosted page
- StackOverflow: Apache 2.4 is running very Slow on Windows 8 – 64 bit
- StackOverflow: IE10 (Windows 8) crashing Apache
- SuperUser: Apache 2.4 on Windows responds slowly, hangs when serving some dynamic pages
- Apache Lounge: Apache 2.4 => winnt_accept: Asynchronous AcceptEx failed.
- WampServer: Apache Port 80 Localhost hangs very often