I get an intermittent timeout processing some AJAX POST request. Setup: Apache 2.2.17 -> mod_jk 1.2.26 -> JBoss 4.3 CP01 (with Tomcat 6.0). Application is built with JSF 1.2_11, Seam 2.1, RichFaces 3.3.1.
It usually happens with IE browsers (7,8,9). The browser sends an ajax request (RichFaces produces JavaScript code for that). This HTTP POST request gets transformed into AJP Header and body packets by mod_jk and sent to Tomcat. The header package says content length is 1760, but the body packet has 0 in the length field and no content. The packets were captured with tcpdump. The 0 ajp body packet doesn't happen for every problematic request. All ajax requests/responses are small, up to 30K, no file uploads and no lengthy DB queries.
At this stage, mod_jk log shows the request was processed in 2 minutes. In our test environment we also got 2,3,4, and 6 minutes. The application filter that wraps the request also shows 2 minutes time; the filter is simple - get timestamp before and after the request and log the difference.
JSF phase listener of the app is invoked, with each phase (request, view restore, validation, invoke, render) taking on the order of 100ms - usual for the app. So the timeout must happen between at the start of the request (after filter and before 1st JSF phase) or at the end (after render JSF phase and before filter end).
Sometime, mod_jk says read timeout by client; who is the client - browser, apache? There are no exceptions logged in JBoss, at DEBUG level.
Did somebody come across something similar? mod_jk reply_timeout setting doesn't solve the issue. Connecting straight to JBoss gives us around 30s timeout, which we never saw before and we don't know if it's related to the 2min timeout.