ASP.NET: High CPU usage under no load

狂风中的少年 提交于 2019-12-03 07:43:18

In windbg, issue:

~*e !clrstack

This will dump all of the managed thread stacks and should give you an idea of what is happening in that process.

Also try a !runaway, which will show you how much time each thread has been running. Focus on the stacks of the top threads which are the ones that have been running longest.

Is this possibly being caused by a cache issue? For example, do you have a cached dataset set to automatically re-load from the DB when it expires?

We had this situation once. We had a large dataset that we wanted to be always available. The data didn't change that often, so we set it in the cache with a 1 hour expiration, and then in our global.asax, we handled the removal (as described here without paying attention tot e warning described in the link. We re-loaded the dataset to the cache after the hour had passed and this caused high cpu usage and high db usage every hour.

edit - added

Needless to say, we saw this quickly and learned from our mistake.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!