为什么 tomcat AJP 连接器没有释放连接

为什么 tomcat AJP 连接器没有释放连接

我这里有一个带有 Web 应用程序的 Jboss。Tomcat 配置为使用 AJP 连接器。传入连接通过 Apache 反向代理隧道传输到连接器。现在我意识到,在高负载下,连接器会将一堆连接永远保持在“保持活动”模式,并且不会再释放它们。

使用普通的 HTTP 连接器时,应用程序运行良好,但现在使用 ajp 连接器时,应用程序就会出现常规停滞。

有人能给我一些建议,从哪里开始解决这个问题?为什么连接器在空闲 300 秒后没有再次释放连接?

谢谢,克里斯

答案1

看一下文档ajp 连接器

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).

http 连接器的默认超时时间为 60 秒:

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).

因此请将connectionTimeout值更改为与您的环境相匹配的值。但请确保将该值与值connection_pool_timeout或等效值同步,如中所述本文档

相关内容