开发者

What would cause a 1 second delay added onto all my POSTs on DEV but not LIVE?

Two Win2003 servers running ASP.NET sharing same SQL Server, one is DEV the other is LIVE. They are both clones of each other, one is the development box. The dev box is going really slow but I noticed it even happens on a 404 response开发者_JAVA百科 even. When I browse to a fake URL with either domain to get a 404, the dev box was like 1.4 seconds and other box was like 200ms. So it wasn't recent code changes. Is there some IIS configuration or web.config setting that would cause this?

(I did a traceroute to both and it turned out equal)


It could be a lot of things:

  • The DEV machine is resolving or trying to resolve the clients' DNS name.
  • The DEV machine has to perform a DNS query for the DB machine.
  • The DEV machine not using connection pooling (check the connection string).
  • Is the KeepAlive setting the same in both machines?
  • Is there any AD authentication involved? Could that be slower from DEV?
  • What if you do the POST locally on DEV? Is it still slow?


Are you on the actual dev console?

If so, is it a Firefox or WebKit IPv6 issue? Many of us devs have IPv6 available on our own boxes, and some browsers are pretty slow with it if it's not set up completely. Try using IE and see if you get a fast response on your dev box.

When I access local apps in Chrome, it takes several seconds for the page to display. Same with Firefox until I disabled IPv6 in its config.


Since even a 404 Not Found is slow, that says it probably isn't related to your DB, unless perhaps you're doing some sort of logging or other DB access from Global.asax or an HttpModule.

Have you looked in the Windows error log to see if any errors are being reported?

If ping and tracert from your client to both servers looks OK, and if it also looks OK from the web servers to the DB, then you might look at things like:

  1. Hardware problems (flakey network cables are a common culprit). Maybe try swapping your live and dev machines, and see if the problem stays on the same hardware. Flakey disks can also cause slowness as the controller retries.
  2. IIS-related configuration errors. If the site works and is just slow, you might look at your back-end logging, tracing, etc, if you have any.

You might also look into upgrading to Win 2008. IIS 7 has some much-improved debug facilities, including things like Failed Request Tracing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜