Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Long program process time causes server time-out

Status
Not open for further replies.

iamanson

Programmer
Aug 17, 2001
42
AU
Hi,
One of my function in web application need a very long process time (can be as long as 10 minute) and it display a message:
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the system event log of the web server. Please review this log entry to discover what caused this error to occur.

and the message in event log is:
aspnet_wp.exe (PID: 1752) was recycled because it was suspected to be in a deadlocked state. It did not send any responses for pending requests in the last 180 seconds.

How can I solve this problem?
 
did your code contain any loops??? perhaps there contained a neverending loop ^-^ (just a thought)
 
I think not. The reason of long processing time is that it inserts thousands of records into database. Now, I keep "Response.Write("something")" during this process to make it work. Seems quite dirty[thumbsdown].
Is there any better method?
 
Hmmm...to me it looks like the time it takes to run your process is longer than the session timeout of your web application. Try setting the session timeout to something crazy like an hour or something, and then test it. That'll keep you from having to keep response.writing stuff to the screen.

Jack
 
you mean you're inserting thousands of records into a database in one process??? wo pretty cool but crazy ^-^ (joking)

well, could you let us see your code (that insert thousands records into a database)... well, just curious you know ^0^... if you don't mind of course :)
 
well, i am working on a portal site and it needs to insert ruser record into database. Just while loop, nothing special.
It's normal that server 'suspect' it's in a deadlocked state.
 
well, i am working on a portal site and it needs to insert user record into database. Just while loop, nothing special.
It's normal that server 'suspect' it's in a deadlocked state.
 
aspnet_wp.exe (PID: ????) was recycled because it was suspected to be in a deadlocked state. It did not send any responses for pending requests in the last 180 seconds.


or something like that is not a sql error but a process timeout on your server. Its becasue of the setting for processinfo deadlocking in your Machine.config file. but this could be because your query is too large. you can jack up the value but its a machine global setting so it will effect all apps and can lead to log jamming of processes if you have 1000's of users.
 
Hi all,
I am faced with the same problem. I am very new to working on .NET . My problem is exactly the same as iamanson.
Will be thankful if somebody can help me out with the workaround or solution they have come up with.

Thanx in advance,
Chandresh
 
If you need to run for 10 minutes without timing out (you probably should investigate other solutions) then change the following in your machine.config

<processModel
...
responseDeadlockInterval=&quot;00:03:00&quot;
...
/>

to &quot;00:10:00&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top