用Apache做负载均衡时HTTP长连接每5分钟断线
Apache被常用来做Java应用系统的负载均衡软件,Tomcat、Websphere、Weblogic等都有相应的插件支持Apache集成负载均衡。但是最近遇到这样的问题,对于大数据量的长HTTP连接的业务每过5分钟就断线了,而且每5分钟就重发同一个http请求到应用服务器。
Apache的httpd.conf有下列两个配置参数,类似地Array、F5等负载均衡硬件也应该有这些配置:
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
