Search code examples
.netwindows-serviceswindows-7-x64

.net service start timeout on windows startup


I have a .net service that starts when windows starts, and sometimes ( totally random ) the service fails to start.

Event viewer shows: A timeout was reached (30000 milliseconds) while waiting for the MYSERVICE service to connect.

Even on the machines that the service fails to start if I start it manually (after windows logon ) it start fine.

My start method is very basic, it just starts a new thread with the actual start-up logic ( usually is very fast ).

My service requires .net 3.5 sp1 and the machines that are having these problems are win7 x64. I suspect that it has something to do with the .net framework, but I don't know how. This is happening on a clients machines and he has the .net 4 client profile installed.

Any ideas?


Solution

  • I've had problems like this one. Normally is due to the machine load on startup. For example, I had this error on SQL Server due to many other services starting too.

    One simple way of fixing this is setting the service to start in delayed mode because then your service will be started under less CPU and HD load.