We have web apps deployed with a typical Apache 2, mod_jk 1.2.*, JBoss 4.2.3 infrastructure. I've been trying to diagnose an ongoing issue with an application deployed on this stack.
This behavior is consistent across all of our JBoss 4.2.3 web applications. On the other hand, we also have applications deployed on JBoss 4.0.2 with the same Apache and mod_jk front-end, and they do not exhibit this behavior – Apache to JBoss roundtrip latency is small to nil.
So, what is different? I’ve been researching JBoss 4.2.3 today, and there are some issues with the newer version of embedded Tomcat in terms of CLOSE_WAITs. I’ve put in place the needed config to account for that issue. However, the latency issue remains.
I'm pulling my hair out on this one...any help would be most appreciated. Thanks!
So, found some more interesting tidbits. Mod_jk is very particular about the network packets it receives:
So, the recommended fix (https://jira.jboss.org/browse/JBPAPP-366) is to move to the JBossWeb Native, aka the Apache Portable Runtime. The installation couldn’t be simpler – drop in the new files into /bin/native, and restart (see http://community.jboss.org/wiki/HowToAddAprToJBoss).
Long story short, the APR replaces the out-of-the-box way that JBoss handles AJP and HTTP requests. Its faster, and apparently doesn’t have the mod_jk network packet issues. I’ve installed on both Test and Prod, and the app appears...fast and stable.
Not declaring victory, but its close.
EDIT: At this point, all seems well, so I'm going to consider the issue closed.
|Retrieving data ...|