I have upgraded my apache 2.2.6 box with the _prefork_ mpm to apache 2.2.11 with the _worker_ mpm. It's a reverse proxy for 2 backend tomcat(ajp) servers. Apache is also used as balancer. <Proxy balancer://patmos> BalancerMember ajp://tomcat2:8009 route=mmbase01 min=5 smax=10 max=15 BalancerMember ajp://tomcat1:8009 route=mmbase02 min=5 smax=10 max=15 </Proxy> Since this upgrade apache serves sometimes wrong content. It seems that the served content comes from another thread. Something like a thread-safe problem. After this upgrade I tried figure out what the problem is. A downgrade to 2.2.6 with _worker_ mpm resolve the problem. After that I upgraded to 2.2.10 without problems again. My conclusion: This bug is introduced in 2.2.11.
Please provide - A small test case including a small web application and a request that shows the behaviour - The Tomcat version you are using and what kind of Tomcat connector you are using - What clients trigger this issue (e.g. which browser, is it a POST or a GET request) - A network sniff that exposes the problem
Please provide the lines in the error log file containing proxy:
Since this seems to be difficult to reproduce in general, and it's easy for you, could you please confirm, that your 2.2.10 and 2.2.11 tests were done on the same systems, using the same backends, both versions using worker MPM, same version of the APR libraries and same configuration? If yes, then it should be interesting to redo the tests with - httpd 2.2.10 using mod_proxy, mod_proxy_ajp and mod_proxy_balancer from 2.2.11 - the other way round, using httpd 2.2.11 and the proxy modules from 2.2.10 As far as I can see, the mixed environments should work in principle. In case the problem shows only up with one of the two combinations we would know, whether the root cause is in the core or the proxy modules. Of course the info requested in comments #1 and #2 will be very helpful as well.
I am using apache-tomcat-6.0.16 with the following connector: <Connector port="8009" protocol="AJP/1.3" redirectPort="443" maxThreads="512" enableLookups="false" /> This bug is hard to reproduce. It seems that this is only a problem onder load. Even on a test envoirement I can't reproduce it. Because many of our clients complain to this issue, I set up a wget loop that downloaded a test.jsp containing the word 'hello'. In this way I saw there was sometimes other content downloaded than the word 'hello'. I think that the errors in the error log are not related to this issue, because the time doesnt match: [Sun Mar 29 16:35:00 2009] [error] proxy: read zero bytes, expecting 1902 bytes [Sun Mar 29 16:38:03 2009] [error] proxy: read zero bytes, expecting 1902 bytes [Sun Mar 29 16:51:49 2009] [error] proxy: read zero bytes, expecting 1902 bytes I will try a mixed version of .10 and .11, but first weekend!
Committed a fix to trunk (r763394) that was tested successfully by Sander.
A patch for 2.2.11 can be also found in some hours at the mirrors and at http://www.apache.org/dist/httpd/patches/apply_to_2.2.11
We are experiencing the same problem on Windows 2003 server (httpd 2.2.11). Will patch be available in 2.2.12?
Backport to 2.2.x as r768506.
Can you confirm that this problem has been fixed on Apache 2.4.x? Many thanks!