I have a windows service I created that works perfectly in debug, but as soon as I put it out and install it as a service from release, it gets 2 ticks through the timer and then nothing. Here is some information on it:
The service collects statistics information from performance counters on a number of machines and stores it in a SQL database. There is a timer in the base service that on tick ( 5 second intervals) calls an update method which iterates through the counters configured (81 at this point) and gets the next value and writes to the database. I use a thread pool to handle the updates and writes, and Queue up each of the configured(again 81 at this point) counters.
In debug the service runs without a flaw. It generates thousands of rows of data and runs until I tell it to stop. When compiled and installed using installutil.exe, even using the same login to run the service, I get exactly 2 ticks and then nothing. I know this because I get 162 new rows of data and it stops. The service is still running in Windows however, and I can see it as started in Services, and active in the Task Manager.
Any ideas what is causing this behavior?
Jon