为什么ASP.NET Web服务应用程序需要IIS重置 [英] Why ASP.NET web service application is required IIS reset

查看:84
本文介绍了为什么ASP.NET Web服务应用程序需要IIS重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户调用Web服务方法时,CPU利用率为70%到80%,例如时间12.01.00,但是在12.02.00之后的一分钟后它就会增加到数据库服务器,数据库服务器会以毫秒为单位给出响应对于该请求,我们收到此错误System.Web.HttpException(0x80004005):请求在elmah中超时。在Web服务方法接收请求和将其发送到数据库之间存在时间差。当CPU正常时,一切都能在几秒钟内顺利运行。我不明白为什么在.net端收到的请求和发送到数据库之间发生这一小时差异。重置后iis正常工作。这只发生在生产服务器上但不在开发和UAT服务器上。

IIS版本:-8.5和sql 2012



我尝试了什么:



试图在我们首先遇到性能问题时发现我们检查数据库是否正在运行任何繁重的查询或没有。

When CPU Utilisation riches 70% to 80 % at that time when user call web service method for e.g like time 12.01.00 but it riches to database server after one minute like 12.02.00 and database server gives response in fraction of milliseconds for that request and we receive this error System.Web.HttpException (0x80004005): Request timed out in elmah .There is a time difference between receiving request at web service method and sending it to database. When CPU normal then everything works smoothly within fraction of seconds.I don't understand why this one min time difference occurring between received request at .net side and sending it to database. After reset iis every thing work normal .This happens only production server but not in development and UAT Server.
IIS version:-8.5 and sql 2012

What I have tried:

tried to find whenever we get performance issue first we check the database any heavy query is running or not.

推荐答案

你看过HttpException了吗?可能存在内部异常和其他信息可能会让我们有些猜测。我通过错误代码看到它是超时,但是谁知道。



如果这没有帮助,请尝试在SQL Server Management Studio中使用分析器。 />


最后,如果它确实是延迟的Web方法调用,请尝试调试服务调用并查看何时到达Web方法中的断点。如果发生这种情况,问题出在您的代码之外,必须是某些网络问题或配置问题。例如,它可能是未正确设置的IIS。
Have you looked at the HttpException? There may be an inner exception and other information that may save us some guessing. I see by the error code that it's a timeout, but who knows.

If this does not help, try using the profiler in the SQL Server Management Studio.

Last, if it's really the web method calln that's delayed, try debugging into the service call and look when a breakpoint in the web method is reached. If that happens, the problem is outside your code and must be some network problem or a configuration problem. For example, it could be the IIS that is not properly set up.


这篇关于为什么ASP.NET Web服务应用程序需要IIS重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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