Apache filling up with connections in state “Reading Request”

apache-2.2connectionhp-uxmod-jk

I have a problem with an apache who's stalling with too much requests. When I take a look at the server-status page I can see that most of the connections are in state "Reading Request", but do not finish. When I do a graceful restart, all of the "Reading Request"-connections disappear. Because the restart does not take long, I belief the connections are not used any more.

The apache is filling up with these request over some time (> 30 minutes). But when the connections are not used any more, I would expect some timeout to kill these connections, but this does not happen or the timeout is too big.

Does anyone know which timeout should kill these connections or am I searching at the wrong point?

Some details to the setup:
apache 2.0.55 on HP-UX with mod_jk 1.2.10
Most of the connections in state "Reading Request" are connections to an tomcat backend over mod_jk (client –> HP-UX apache –> Tomcats), but not all of them.
I know that mod_jk is a very old version, it is planned to be updated soon.

But I do not suspect mod_jk, because the same effect appears when redirecting the connections to another apache with newer mod_jk and then redirecting the connections to the tomcats (client –> HP-UX apache –> Linux apache –> Tomcats). It is always the HP-UX apache filling up with "RR"-connections.

Best Answer

What is your workers.properties file content? Do you try to use socket_timeout?

  socket_timeout    0   Socket timeout in seconds used for the communication
                        channel between JK and remote host. If the remote host
                        does not respond inside the timeout specified, JK will
                        generate an error, and retry again. If set to zero
                        (default) JK will wait for an infinite amount of time on
                        all socket operations.

By default the socket_timeout is infinite.