Installation guide

Chapter 4. Troubleshooting and optimizing mod_jk
While optimizing the configuration in Apache, mod_jk, mod_proxy, mod_cluster and JBoss typically
resolves any and all problems and errors in load balancing, there are exceptions (such as long running
servlets that require additional optimization).
In most cases, a correctly tuned configuration is the catch all for mod_jk issues. T his section discusses
some problems and how the configuration can be improved to avoid them.
Optimization Conside rations
Ensure you are on the latest supported component versions.
Ensure the relevant configurations are tuned correctly. The Red Hat Global Support Services staff
can use interactive tools to assist you with tailored configuration settings. Find the appropriate
contact details at https://access.redhat.com/support/.
If optimizing the configuration does not resolve the issue the problem is most likely on the JBoss/JVM
side. Refer to Procedure 4.5,JBoss/JVM Problems for advice about these issues.
4.1. Common Problems
The list below outlines some common configuration problems. Ensuring your implementation is not
subject to one of these may assist to resolve your issue.
Specific errors and general performance issues are discussed later in this section.
Common Configuration Issues
JkShmFile on a NFS share
Placing the JkShmFile on a NFS share can cause unexplained pauses in mod_jk and odd
behavior. It is strongly recommended that the JkShmFile always be placed on local storage to
avoid problems.
A firewa ll bet ween Apache and JBoss
If there is a firewall between Apache and JBoss and no socket_keepalive parameter is set,
the firewall can close connections unexpectedly.
MaxClients highe r t han maxThreads
Setting the MaxClients parameter in Apache higher than the maxThreads setting in JBoss
(with a high load on the server) will result in Apache overwhelming the JBoss instance with
threads which will cause hung and/or dropped connections.
No connectionTimeout pa ramet e r set
The connectionTimeout parameter set in JBoss is required for proper maintenance of old
connections.
No cping/cpong set
The cping/cpong property in mod_jk is the most important mod_jk worker property setting and
allows mod_jk to test and detect faulty connections. Not setting this parameter can lead to bad
connections not being detected as quickly which can lead to web requests behaving as if
'hung'.
Running an old version of mod_jk.
There are known issues with sticky sessions in versions prior to mod_jk 1.2.27.
Running an older version of EAP.
There is a bug in EAP 4.2 base and EAP 4.2 CP01 which causes sockets to be left in the
CLOSE_WAIT state, thus causing the appearance of hung requests again. T his issue has
been reported and fixed https://jira.jboss.org/jira/browse/JBPAPP-366
Unresponsive back end server
java.lang.OutOfMemoryError errors or high pause times can cause the back end server to
become unresponsive.
All of the problems listed above are typically resolved after optimizing the configuration in Apache,
mod_jk, and JBoss.
16 Chapter 4. Troubleshooting and optimizing mod_jk