This question is locked. New answers and comments are not allowed.
Has anyone experiences IIS hanging (for lack of a better word) and CPU usage maxes out on all 4 processors. I am able to stop debugging and run my application again, but it is almost as if there is a thread in a endless loop that is out of control continuing to run in the background.
I am able to reproduce the issue by rapidly clicking to reload the page and its data, eventually something happens and it hangs IIS. Stopping the debugger does not help the issue either, the CPU usage still remains high and continues to climb even though i am doing nothing as if there is a background thread still running.
My application does not implement any custom threading. If there is a thread with a issue it is not one that i have started. The code in question is pretty simple stuff, there are no large database calls and no calls to the db within any loops that might hang. In order for me to get my processors back i have to either restart my machine or restart the World Wide Web Publishing Service, once this is done the CPU usage drop back down to 0%.
Reproducing the issue is sporadic, no errors are being caught in any of my error logging. I have gone through a process of elimination and the issue only seem to occur (at least more frequently) when i enable some of my custom user controls that calls methods in my DAL. E.g. this one:
As you can see, nothign out of the norm. This method is like all the other DAL methods i have. I do not think that it is this method or code in particular but rather the ORM and the fact that i am rapidly calling for data.
Is there anything that would cause the ORM to get hung up? Has anyone seen or experienced this before? And is there anything additional i can do to debug this?
Thanks,
Duncan
I am able to reproduce the issue by rapidly clicking to reload the page and its data, eventually something happens and it hangs IIS. Stopping the debugger does not help the issue either, the CPU usage still remains high and continues to climb even though i am doing nothing as if there is a background thread still running.
My application does not implement any custom threading. If there is a thread with a issue it is not one that i have started. The code in question is pretty simple stuff, there are no large database calls and no calls to the db within any loops that might hang. In order for me to get my processors back i have to either restart my machine or restart the World Wide Web Publishing Service, once this is done the CPU usage drop back down to 0%.
Reproducing the issue is sporadic, no errors are being caught in any of my error logging. I have gone through a process of elimination and the issue only seem to occur (at least more frequently) when i enable some of my custom user controls that calls methods in my DAL. E.g. this one:
public
IList<CampaignDTO> getCampaigns(
string
email)
{
IList<CampaignDTO> outobj =
new
List<CampaignDTO>();
using
(BluefireDBContext dbContext =
new
BluefireDBContext())
{
Users user = dbContext.Users.Single(u => u.Credentials.Email == email);
IList<Campaigns> campaigns = dbContext.Campaigns.Where(c => c.UserGroupID == user.UserGroupID).ToList();
foreach
(Campaigns campaign
in
campaigns)
{
CampaignDTO newdto =
new
CampaignDTO();
newdto.CampaignID = campaign.CampaignID;
newdto.ReferrerID = campaign.ReferrerID;
newdto.CampaignName = campaign.CampaignName;
newdto.UserGroupID = campaign.UserGroupID.Value;
newdto.Active = Convert.ToBoolean(campaign.Active.Value);
outobj.Add(newdto);
}
}
return
outobj;
}
As you can see, nothign out of the norm. This method is like all the other DAL methods i have. I do not think that it is this method or code in particular but rather the ORM and the fact that i am rapidly calling for data.
Is there anything that would cause the ORM to get hung up? Has anyone seen or experienced this before? And is there anything additional i can do to debug this?
Thanks,
Duncan