诊断"请求超时" HttpExceptions [英] Diagnosing "Request timed out" HttpExceptions

查看:275
本文介绍了诊断"请求超时" HttpExceptions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面在计算器上,我们看到了几个天天向上请求超时的异常。

Here on StackOverflow, we're seeing a few "Request timed out" exceptions every day.

事实:


  • 请求超时是默认的90秒。

  • 员额只发生

  • 数据发布是文本,通常很小(小于1KB),但到几KB

  • 没有形成数据在服务器变量抓获

  • 客户端的UA是多种多样的:IE5.5 - 7,火狐3.0.5,iPhone,Chrome浏览器

  • 客户端的位置是多种多样的:英国,法国,美国 - NC,OH,NE,IN

我们已经测试了基于服务器的超时(即使用Thread.sleep代码)和所有的表单变量都正确捕获在异常日志 - 这使我们相信客户端发送有问题请求在规定的时间

We've tested a server-based timeout (i.e. using Thread.Sleep) and all form variables are correctly captured in the exception log - this leads us to believe the client is having issues sending the request in the allotted time.

有关如何捕获/调试任何思考这个条件是非常欢迎!

Any thoughts on how to trap/debug this condition are very welcome!

推荐答案

我有在使用小AJAX web服务我们的生产服务器同样的问题。我们的防火墙之外后做数据包捕获,我们发现,POST到服务两个TCP段来临和第二段从来没有给我们。 (第一个数据包中只包含标题,第二次丢失的数据包应该是JSON体)所以基本上IIS是只是坐在那里等待POST的其余部分。配置超时后,服务器会发送一个RST包到客户端并记录请求超时的错误 - 这是正确的行为。

I've got the same problem on our production servers that use a small AJAX webservice. After doing packet captures outside our firewall, we found that the POST to the service was coming in two TCP segments and the second segment never got to us. (first packet only contains headers, the second missing packet should be the json body) So basically IIS is just sitting there waiting for the rest of the POST. After the configured timeout, the server sends a RST packet to the client and logs the "Request timed out" error - which is correct behavior.

我们正试图让没有多少运气客户摄制,但是对我们来说,这似乎完全网络相关的(也可能是一些安全软件,它不喜欢的帖子的内容)。

We are trying to get a client repro without much luck, but in our case this appears to be completely network related (or possibly some "security" software that doesn't like the contents of the post).

这篇关于诊断"请求超时" HttpExceptions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆