Sql Server Profiler 跟踪显示 Web 应用程序超时

发布于 2024-09-08 05:45:26 字数 229 浏览 4 评论 0原文

我正在尝试使用 Sql Server Profiler 针对 Visual Studio 开发服务器中运行的 Asp.NET 网站应用程序运行跟踪。

但是,每当跟踪运行时,来自 Web 应用程序的所有数据库请求都会失败,并给出错误消息:

“超时已过期。在操作完成之前超时时间已过,或者服务器没有响应。”

如果我停止跟踪,Web 应用程序将再次运行。

对此的任何意见都将受到赞赏。

I'm trying to run a trace with Sql Server Profiler against an Asp.NET Website Application running in Visual Studio development server.

However, whenever the trace is running, all db requests from the web application fails giving me the error message:

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

If I stop the trace, the web application works again.

Any input on this is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谁人与我共长歌 2024-09-15 05:45:26

您只需要在调试时增加 sql 连接上的 CommandTimeout 以及应用程序池超时值。

You just need to increase the CommandTimeout on the sql connection while you are debugging and the application pool timeout values as well.

涙—继续流 2024-09-15 05:45:26

一旦解决了探查器超时问题,您应该考虑调整数据库(如果您还没有这样做,尽管听起来不像)。

我最近遇到了类似的问题,结果是由于某些查询/语句的高读取导致 IO 阻塞。让探查器在已经很缓慢的数据库上运行是很困难的。我们必须在安静的时间以十分钟的时间段运行分析器,尽管这无助于识别最重负载的最大问题。

一旦我们让探查器捕获数据(在 SQL Server 2005 上)并实施数据库调优顾问 (DTA) 推荐的索引和统计信息,数据库就会再次以预期的性能水平运行。

我建议您阅读这本有关 sql server profiler 的免费电子书...

http://www.red-gate.com/products/SQL_Response/offers/mastering_sql_profiler_ebook.htm

它详细介绍了如何运行轻量级跟踪,这将有助于 DTA 推荐索引和统计信息,从而提高数据库的性能和还可以识别代码中可能存在的一些运行缓慢的查询。

您正在运行的跟踪可能会使您的数据库崩溃,因此在 10-20 分钟的时间内运行它可能更可行。

如果您遇到 IO 阻塞问题,这通常会影响整个 SQL Server,并且 Management Studio 有时会显得无响应。

Once you get around the profiler timeout issue you should look at tuning your database (if you havent already, although it doesnt sound like it).

I have had a similar issue recently and it turned out to be IO blocking due to high reads on certain querys/statements. Getting the profiler to run on top of an already sluggish database was difficult. We had to run the profiler in ten minute sections at quieter times, although this does not help to identify the biggest issues with the heaviest loads.

Once we got the profiler to capture data (on sql server 2005) and implemented the indexes and statistics recommeneded by the Database Tuning Advisor (DTA) the database was running at expected peformance levels again.

I would recommend you read this free ebook on sql server profiler....

http://www.red-gate.com/products/SQL_Response/offers/mastering_sql_profiler_ebook.htm

It details how to run lightweight traces that will help the DTA recommend indexes and statistics that will improve the performance of your database and also identify some slow running queries that could be located in your code.

The trace you are running could be tipping your database over the edge, so running it in 10-20 minute sections might be more feasable.

If you have IO blocking issues this affects the overall sql server in general and management studio will seem non responsive at times.

江南月 2024-09-15 05:45:26

您是否有可能不小心陷入单用户模式?

试试这个:

ALTER DATABASE [数据库名称] SET MULTI_USER;

Is it possible that you're accidentally stuck in single-user mode?

Try this:

ALTER DATABASE [database name] SET MULTI_USER;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文