Apache closes AJP idle AJP/1.3 connections but connections to Tomcat server. However, for some reasonreasons, these connection these connection close requests do not close Tomcat connections. As a result, at Apache end, we have 0 AJP connections but at the Tomcat side, we have to many established AJP connections emanating from the Apache. This is "half-closed TCP connection" problem. This issue is mostly faced when there are wrongly configured Firewall rulesresult in closing and clearing of corresponding connections at the Tomcat server end. As a result, over a period of time, there will be too many open connections at the Tomcat server end resulting in queuing/rejection of new connection requests from the Apache server. This issue is mostly caused by incorrect firewall rules.
The manifestation of this issue is OpenSpecimen UI/API becoming unresponsive. However, please note, the UI and API will be still accessible by connecting directly to the Tomcat server. Its only the AJP connector that becomes unresponsive.
To resolve this issue
...
, please follow below steps:
1. Edit $TOMCAT_HOME/conf/server.xml
and search for below line:
Code Block | ||
---|---|---|
| ||
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/> |
2. Add ConnectionTimout
Connector attribute to the above line attribute as shown below. This will ensure the AJP connections at Tomcat end are closed after 5 minutes of continuous idleness.
Code Block | ||
---|---|---|
| ||
eg. <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" connectionTimeout="300000"/> |
3. Save
...
the server configuration file.
4. Restart Tomcat serviceserver.