“A timeout was reached while waiting for the service to connect” error after rebooting
问题 I have a custom-written Windows service that I run on a number of Hyper-V VMs. The VMs get rebooted a couple times an hour as part of some automated tests being run. The service is set to automatic start and almost all of the time, it starts up fine. However, maybe 5% of the time, with no pattern that I can discern, the service fails to start. When it fails, I get an error in Event Viewer saying A timeout was reached (30000 milliseconds) while waiting for the My Service Name service to