Long running asp.net process dies

VBAHole22

Contributor
Joined
Oct 21, 2003
Messages
432
Location
VA
I have an asp.net page that directs calls to a webservice to do some work on files for me. Sometimes I go in batch mode and rack up a bunch of files to work on. The calls get made to the webservice and the page sort of freezes for a long time, about 30 minutes. After that time period the screen gives me an error message about the server being unavailable. It's in big red letters and it tells me to look in the system application log for more info. When I go there I get:

aspnet_wp.exe (PID: 324) was recycled because memory consumption exceeded the 609 MB (60 percent of available RAM).

And my process is killed. Any idea what is causing this and how to avoid it. I want my process to run a long time. I have sync and asyc calls being made from the asp.net page but each individual cycle (a file to work on) is only like 4 minutes. Is there some way I can get it to take a break for a second between cycles or something?
 
Yeah, I can see a steady incline in the processor usage. I am using some third party dlls (ESRI) that I don't think are being released. But I've read, in posts here, that it is no use to mess with garbage collection because .NET handles all of that for you.
I don't think I have any recursion, but I didn't think there was anything wrong with it. And is it always possible to simply 'convert' them to loops?
 
Even though .NET recycles everything for you, I think its good practice to make sure that everything has been cleaned. This doesn't mean that you need .dispose when closing everything, but if you're using 3rd party dll's, this would be a good start...
 
Okay. That means I need to figure out how to dispose of these objects. Seems like ESRI isn't really ahead of the curve when it comes to .NET.
They really aren't helping developers much with the platform. I have heard different things about how to release the objects.
More testing.
 
When my asp.net page calls these web services it does so on multiple files, a batch mode. I bumped up the memory allocation and I am going to figure out how to deallocate these 3rd party COM objects. But....

Now my asp page hangs after a while. And the page itself never refreshes once the processes start. If I could get the page to refresh after each cycle then I think this problem would be solved. How can you force a page refresh?
 
Use an asynchronous call to start your processing and have a javascript function post back the page every few seconds to check the status of the process.

If you catch the asynchronous callback and set a flag specifying that it is complete, you can check the flag every time the page posts back.

Good luck.
 
Back
Top