We used Apache with JBOSS for hosting our Application, but we found some the process of thread handling of mod_jk.

Our website comes under low traffic websites and it has maximum 200-300 concurrent customers throughout our website's peak activity time. Because the traffic develops (not when it comes to concurrent customers, but when it comes to cumulative demands which found our server), the server stopped serving demands for lengthy, even though it did not crash but tend to not serve the request till 20 mins. The JBOSS server console demonstrated that 350 thread were busy on servers although there is enough free memory say, a lot more than 1-1.5 GB (2 servers for JBOSS were utilised that have been 64 bits, 4 GB RAM allotted for JBOSS)

To be able to look into the problem i was using JBOSS and Apache Web Consoles, and that we were simply because the thread were showing in S condition as lengthy as minutes although our pages take around 4-5 seconds to become offered.

We required the thread dump and located the threads were mostly in WAITING condition meaning these were waiting indefinitely. These threads weren't in our Application Classes but of AJP 8009 port.

Could somebody assist me to within this, as someone else may also got this problem and solved it in some way. Just in case anymore details are needed then tell me.

Is also mod_proxy much better than using mod_jk, or you will find another issues with mod_proxy which may be fatal for me personally basically change to mod__proxy?

The versions I made use of are the following:

Apache 2.0.52
JBOSS: 4.2.2
MOD_JK: 1.2.20
JDK: 1.6
Operating System: RHEL 4

Just help.

Men!!!! We finally found the workaround using the configuration pointed out above. It's utilization of APR and it is pointed out here: http://community.jboss.org/thread/153737. Its problem as properly pointed out by many people folks solutions below i.e. connector problem. Earlier we made temporary workaround by setting up hibernate and growing response time. The entire fix is APR.

We're going through similar issues. We're still focusing on solutions, however it appears like a lot of solutions are available here:

http://world wide web.jboss.org/community/wiki/OptimalModjk12Configuration

Best of luck!

It's also wise to have a look in the JBoss Jira problem, entitled "AJP Connector Threads Hung in CLOSE_WAIT Status":

https://jira.jboss.org/jira/browse/JBPAPP-366