S
Stonie
Hi All,
I have an asp.net web application that needs to clean up some worker
threads on application shutdown. These threads are emptying an in
memory buffer of messages to disk.
Basically I want these threads to empty any remaining messages to disk
before exiting.
To do so, I'm calling a clean up method in Application_End()
To test the cleanup methods, I stop IIS using CMD: "IISRESET /stop"
Most of the time this works fine, the threads complete cleanup in time.
However sometimes the cleanup task takes a while to complete. In this
case IIS seems to forcefully shutdown killing the worker threads before
they can finish emptying their buffers.
So in essence I have the following questions:
1.What is the timeout IIS allows for calls to me made in
Application_End() before it forcefully exits? and is there a way to
extend this timeout?
2.Is Application_Disposed() a better place to be doing this kind of
cleanup work? And if so what is the difference in function to
Application_End()?
Any help is greatly appreciated, I fear that if this application
becomes very busy, in memory data may be lost on shutdown.
Thanks in advance.
Kind regards,
Andrew Stone.
I have an asp.net web application that needs to clean up some worker
threads on application shutdown. These threads are emptying an in
memory buffer of messages to disk.
Basically I want these threads to empty any remaining messages to disk
before exiting.
To do so, I'm calling a clean up method in Application_End()
To test the cleanup methods, I stop IIS using CMD: "IISRESET /stop"
Most of the time this works fine, the threads complete cleanup in time.
However sometimes the cleanup task takes a while to complete. In this
case IIS seems to forcefully shutdown killing the worker threads before
they can finish emptying their buffers.
So in essence I have the following questions:
1.What is the timeout IIS allows for calls to me made in
Application_End() before it forcefully exits? and is there a way to
extend this timeout?
2.Is Application_Disposed() a better place to be doing this kind of
cleanup work? And if so what is the difference in function to
Application_End()?
Any help is greatly appreciated, I fear that if this application
becomes very busy, in memory data may be lost on shutdown.
Thanks in advance.
Kind regards,
Andrew Stone.