HTTP Keep-Alive 能支持长轮询吗?
HTTP Keep-Alive can sustain long polling?
我对long polling的理解是,向服务器发送请求,服务器花一些时间return数据给我们,或者逐渐发回数据。
我的 java servlet 应用程序(在 weblogic 服务器中 运行)遇到问题,在客户端发出请求后,后端 servlet 的处理时间大约需要 1 分钟,当 servlet试图发回响应时,我遇到了 "broken pipe" 问题。
这个问题是我的客户报告的,我无法在我的环境中重现它,事实上,我写了一个小的 servlet 来测试我最终什么时候会遇到读取超时问题。毫不奇怪,我的浏览器可以等待服务器 return 响应超过 5 分钟。
我的客户遇到这种管道破裂问题的原因可能是什么?
我怎么可能解决?
根据http://support.microsoft.com/en-us/kb/813827、
Internet Explorer reuses the same TCP/IP socket that was used to
receive the initial request until the socket is idle for one minute.
After the connection is idle for one minute, Internet Explorer resets
the connection. A new TCP/IP socket is used to receive additional
requests.
是否有可能保持活动超时(1 分钟)实际上覆盖了 'read-timeout'(我的理解 'read-timeout' 有非常长的时间),所以它导致 TCP 连接关闭?
那么现在,这也带回来一个问题,当它说"idle for one minute"时,"idle"的定义是什么?现在TCP打开一个套接字并发出请求,同时等待服务器处理大数据和return,是否意味着现在是"idle"?
Is that possible the keep-alive timeout (1 minutes) actually overwrite the 'read-timeout' (my understand 'read-timeout' has very damn long timing), so it cause the TCP connection close?
不,HTTP keep-alive 和 TCP keep-alive(不清楚你真正指的是哪个,它们有不同的含义)都与超时没有任何关系,因为套接字处于空闲状态。
what is the definition of "idle"?
空闲意味着没有数据传输。
我对long polling的理解是,向服务器发送请求,服务器花一些时间return数据给我们,或者逐渐发回数据。
我的 java servlet 应用程序(在 weblogic 服务器中 运行)遇到问题,在客户端发出请求后,后端 servlet 的处理时间大约需要 1 分钟,当 servlet试图发回响应时,我遇到了 "broken pipe" 问题。
这个问题是我的客户报告的,我无法在我的环境中重现它,事实上,我写了一个小的 servlet 来测试我最终什么时候会遇到读取超时问题。毫不奇怪,我的浏览器可以等待服务器 return 响应超过 5 分钟。
我的客户遇到这种管道破裂问题的原因可能是什么?
我怎么可能解决?
根据http://support.microsoft.com/en-us/kb/813827、
Internet Explorer reuses the same TCP/IP socket that was used to receive the initial request until the socket is idle for one minute. After the connection is idle for one minute, Internet Explorer resets the connection. A new TCP/IP socket is used to receive additional requests.
是否有可能保持活动超时(1 分钟)实际上覆盖了 'read-timeout'(我的理解 'read-timeout' 有非常长的时间),所以它导致 TCP 连接关闭?
那么现在,这也带回来一个问题,当它说"idle for one minute"时,"idle"的定义是什么?现在TCP打开一个套接字并发出请求,同时等待服务器处理大数据和return,是否意味着现在是"idle"?
Is that possible the keep-alive timeout (1 minutes) actually overwrite the 'read-timeout' (my understand 'read-timeout' has very damn long timing), so it cause the TCP connection close?
不,HTTP keep-alive 和 TCP keep-alive(不清楚你真正指的是哪个,它们有不同的含义)都与超时没有任何关系,因为套接字处于空闲状态。
what is the definition of "idle"?
空闲意味着没有数据传输。