Windows service sometimes doesn't start after restart

  • Thread starter Thread starter Dusan Gataric
  • Start date Start date
D

Dusan Gataric

Guest
I made an application that runs as a windows service with a startup type set to "Automatic". Sometimes after computer restart, service doesn't start. I have set NLog logging and Event Logs on start of Main and OnStart methods and after that start after restart "failure" there are no logs neither on file system nor event logs in EventViewer\ApplicationLogs, as that methods haven't even been called.
There is Service Control Manager 7009 error logged in EventViewer\System logs that says that my service didn't respond in a 30000ms and I am pretty sure that the call hasn't been made to my service.
During my tests I have found out that sometimes even popular applications as Windows Defender and Team Viewer haven't started automatically.
After boot, i could always start service manually without any kind of problem.
For now, it occurred only on computers with poor configuration with installed Windows 10 Pro, Version 1803.
After adding ServicesPipeTimeout variable to registry and
increasing the timeout value for the service startup that problem stopped occurring.
I could propose this as fix to my clients, but I would like to deliver it with some valid explanation for customers why should i made them add/update information (which is general to all windows services, not to my app only) in their registries.
Did anybody have similar problem? Is this registered microsoft bug?


Continue reading...
 
Back
Top