ASP.NET: High CPU usage under no load

前端 未结 2 1941
北恋
北恋 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.

提交回复
热议问题