mod_proxy_ajp is new and easy to configure while mod_jk is just the opposite. I would not explain the details how to use them since this type of info can be easily found online. I just want to share what I found after weeks of frustration:
- Use mod_proxy_ajp when your network connection between the proxy and Tomcat is very stable, and the traffic load is low.
- Otherwise use mod_jk.
- By default, Tomcat does NOT recycle abandoned ajp connections. You need to enable that, otherwise, broken network connections between proxy and Tomcat will max out ajp thread pool on Tomcat side.
worker.gui2.socket_timeout=10If everything fails to maintain stable connection, disable connection reuse in Apache .conf file:
worker.gui2.socket_keepalive=True
worker.gui2.reply_timeout=500
worker.gui2.prepost_timeout=10000
worker.gui2.connect_timeout=10000
worker.gui2.retries=5
worker.gui2.connection_pool_timeout=600
JkOptions +DisableReuseTo enable Tomcat recycle abondaned ajp threads, add:
connectionTimeout="600000"
to server.xml file.
No comments:
Post a Comment