Why aren't connections released by the tomcat AJP connector

12,044

take a look at the documentation of the ajp connector:

connectionTimeout   

The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is infinite (i.e. no timeout).

the http connector instead has a default timeout of 60 seconds:

connectionTimeout   

The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is 60000 (i.e. 60 seconds).

so change the connectionTimeout value to a value matching your environment. but be sure to synchronize the value with the connection_pool_timeout value or equivalent as explained in this documentation

Share:
12,044
Chris
Author by

Chris

Updated on September 17, 2022

Comments

  • Chris
    Chris almost 2 years

    I have here a jboss with a web application. The tomcat is configured to use the ajp connector. Incoming connections are tunneled via an apache reverse proxy to the connector. Now I recognized that under heavy load the connector keeps a bunch of connections in "keep alive" mode for eternity and doesn't release them any more.

    With the normal HTTP connector the app did well, but now with the ajp connector we have regular app stallments.

    Can someone give me some advice where to start to look to resolve this issue? Why does the connector not release the connection again after idling for 300 secs?

    thanks, chris

    • Matt Solnit
      Matt Solnit over 14 years
      Hi Chris. Could you add some more detail about how the reverse proxy is set up? Some snippets from the Apache configuration would be helpful.