HighTechTalks DotNet Forums  

Thread dies in windows service

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss Thread dies in windows service in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Thread dies in windows service - 08-05-2003 , 08:56 AM






Hello:

I have a windows service that dequeue message from an MSMQ queue and
does some processing. In the OnStart method, I spawn a thread, that
sleeps for 5 seconds, wakes up, checks the queue, dequeues everything,
goes to sleep for five seconds and so on.

I have noticed that after a certain time period -- sometimes days,
sometimes weeks, the thread dies. So everything gets queued up.

Is there anyway to monitor the thread? I want to set up some way of
check for a heartbeat every few hours and to be notified by an email
if there is no heartbeat.

Is there anyway to do this? I would like the windows service to know
that the thread has died and spawn a replacement thread.

Thanks In Advance.
Surya

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.