ASP.NET: High CPU usage under no load

前端 未结 2 1946
北恋
北恋 2021-02-09 18:44

I´m facing a huge problem since a couple weeks. I´ve an asp.net application hosted under IIS7 (W2008 SP1), and every a couple hours it starts consuming near 50% of the CPU when

相关标签:
2条回答
  • 2021-02-09 19:16

    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.

    0 讨论(0)
  • 2021-02-09 19:28

    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.

    0 讨论(0)
提交回复
热议问题