My windows service just "stops"

  • Thread starter Thread starter Terry Olsen
  • Start date Start date
T

Terry Olsen

I have a windows service that has been running fine for almost 6 months.
Last week, it just stopped working. It is still in the task list and
still shows "started" in the service manager. There are no exceptions
thrown, it just seems to have fell asleep.

The service runs in a loop that checks about 80 servers on a daily basis
to see what the status of the previous nights backup job is. It
downloads the zipped log files from each server. I have two
FileSystemWatcher's running, one that watches for the Zip files to
appear, then adds a routine to the threading.threadpool that unzips the
Xml files contained in them. The other FileSystemWatcher watches for the
Xml files to appear, then adds a routine to the threading.threadpool
that reads the data out of the Xml files.

Since there were no exceptions being thrown, I added debug lines
throughout the code to try to determine where it stops. It does not stop
at the same place every time. Sometimes it'll stop during the FTP
download of a file. Other times it'll stop after finishing reading an
Xml file or executing an Sql Insert statement.

I'm wondering if anyone else has come across this strange behavior and
what you found was the cause? If you want to view the log file, follow
this link: http://boycot.no-ip.com/images/vlm_debug.txt

I should note that the service is running on another computer and has
not exibited this behavior, it's still working fine there.
 
I have seen this happen if the event log is getting full and the service
cant write to the local log............
 
That doesn't seem to be the problem here. I cleared the event log of all
events and it still stops. In fact, it stopped on the first server this
time. The debug log shows that it made an ftp connection to the first server
in the list, and then no more entries... It's like it's waiting for a
response from the server that never comes. But I tried telnetting into the
server on port 21 and I always get a response. This is the strangest thing.
I'm considering now re-writing the entire service using all synchronous
calls. At least then it'd be easier to tell exactly where it's stopping.
 
Sorry I cant help any further, certainly sounds like a mysterious one to
solve!

Regards

John Timney (MVP)
 
Back
Top