Last post Feb 10, 2009 12:05 PM by JulienUQAM
Feb 04, 2009 12:08 PM|JulienUQAM|LINK
I installed a new ASP.NET 2.0 application on the production web server 2 weeks ago. It seemed to work the first day, but since, weird behavior started on the server.
All of the resquest to ASP.NET on the server stoped responding (while html request was doing fine). Restarting the aspnet worker proccess resolved the problem temporarely, unitl it stoped responding again few hours later.
Ive Isolated the new appplication in a separated application pool. Since then, the problem only occurs with this application, leaving the ones in the other pool working just fine.
So few times a week, the aspnet worker process stop responding. Another weird behavior also occurded twice: the
stoped being include in the rendered html pages. Ive investigate that and find that the
Application_BeginRequest in the global.asax (the place where we write the <script>) was not executing. Maybe theres a link, I really dont know.
Anyone have an idea where the look?
Feb 04, 2009 12:43 PM|Evan Freeman|LINK
Web Logs and Event Logs, are the places I would start. Also maybe take a look at perfmon and see what the resource usage on that process is at the time of the hang.
My first guess is a race condition of some kind in code, these types of issues go one of two ways, you get error messages and they are easy to find or no error messages and you want to kill your self. Also if you are accessing any com components in the application
thats a good place to start looking in code as well.
Feb 04, 2009 03:33 PM|JulienUQAM|LINK
Thanks for your help,
Im not the sysadmin of the webserver but Ive ask for some event log and these errors occur frequlently:
A process serving application pool 'AppPool-Net' terminated unexpectedly. The process id was '472'. The process exit code was '0xc0000005'.
I began to look at the perfmon but its hard to target the good counters.
Can it be cause by a large viewstate (250K) that i use to store a list of object (serializable)? I do this because constructing this list require a lot of database access, and I dont want to do it for every postback of the page.
Feb 04, 2009 03:41 PM|Evan Freeman|LINK
Well here is a blast from teh past my old friend 0xc0000005. GOd how I miss this error from the old days of COM and Unmanaged C++, I can tell you what the error means, may help. Basically it says you tried to write something really
big to a place that was really small. In terms of memory.
Used to see it alot with malloc and string manipulation in C++ you wouldn't allocate a memory buffer that was big enough and then try to stick something larger than you could fit into it.
Anyhow remenising. I don't know that 250k is to large for viewstate or not, I avoid viewstate like the plague. But I will say it probably isn't a good idea to use viewstate to hold large collections of object. Because that gets
put into the page, bad idea. If you want to cache your objects and save teh database hit try the Http Cache probably a better solution.
In a nutshell your error would most definitely point to something nasty going on in code.
Feb 04, 2009 03:49 PM|Evan Freeman|LINK
So I did a little digging for you =] And I found something that maybe relevent to your situation. It's a bit complex so I hope your up to the task. So your getting an exception in your application that is killing it. But how to find it?
Link1 ASp.net forum post
Link2 This is the posters blog describing the problem, don't forget to look at the next post as well with the HTTP Module.
These steps may be overkill the logs are going to give you good info, and I would definitely try to switch out from storing in your view state. As a start.
Feb 04, 2009 04:59 PM|JulienUQAM|LINK
Feb 10, 2009 12:05 PM|JulienUQAM|LINK
Hi, im still looking for answers on this.
I changed my code so there is no large viewstate used. I didnt implement the http cache because its emergency right now, so I just hit the database for each postback (temporary...). The crashes (or hang) of the worker process still occur. Sometimes it
goes back on track by its own, sometime its crashes and recycle...
We wrote an application that request the login.aspx page every 5 minutes, and if there is no anwser after 100 seconds, we log this error in a file to report the application failures 24/7. Than we look in the weblog of the application around those critical
time to see what is the last activity on the applcation before failure...We are now waiting for failures to compare the logs and see if they i an commun behavior of the application before it stop responding.
By the way, in the weblog, I have one new file created every day, but why in this file there is many header in the middle of the logs like this ? :
2009-02-10 12:15:00 W3SVC374890243 220.127.116.11 GET /application/login/login.aspx - 6003 - 18.104.22.168 - 200 0 0
#Software: Microsoft Internet Information Services 6.0
#Date: 2009-02-10 12:41:34
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
2009-02-10 12:41:34 W3SVC374890243 22.214.171.124 GET /application/login/login.aspx - 6003 - 126.96.36.199 - 200 0 0
Does it mean an IIS reset during the day? a worker process crash? or something else?
Thanks for your help