Wednesday, March 28, 2007

Windows service stuck in "starting" mode

   I have come across this scenario quite a few times. When you try to start a service some how windows screws up and comes back with an error saying that the service could not be started and the reason for the failure (as expected) is useless. The worst part is that after failure the service still stays in the 'starting' mode for quite some time and there is nothing that you can do to stop it, i mean there is no option to force stop the service.

   I am still trying to figure out some way to get the service to recover faster but can't seem to find any help, google is not helping me either. So the best solution for the moment is to wait till the service recovers on its own and then restart it or you reboot the OS itself (isn't that the universal fix for any problem on windows. ;))

Powered by ScribeFire.


ElectroDan said...

Try matching up the service name to an .exe using MsInfo32.
Then locate the PID of the service using ProcMon (the process may not show up in task manager) then use "Task Kill" from the Windows Support Tools to kill the process. You can then attempt to start the problem service.

adeesh said...

I haven't seen the problem again primarily because i don't start/stop services manually anymore. I have created a VBscript to managed a bunch of services which are relevant to me.

Thanks for the suggestion though. I will try this out if i run into the 'stuck' service issue again. Meanwhile if any of you try this out successfully do post your results here.

Anonymous said...

This idea worked perfect for me...Adaptive Server Anywhere service was hung. Found the .exe and killed it, voila!

Anonymous said...

This was exactly what I needed. My problem was the oposite, I kept getting services stuck at Stopping. After killing the related exe in the processes, it stopped. Unfortunately, that didn't fix the problem for why I was stopping the service.

Anonymous said...

I ran in to same problem quite a few times. Service gets stuck up in starting mode when I try to restart it and eats up 100% of CPU I kill it by using Taskmanager but the problem comes up again when I start it. I found that it doesn't release the file it is using for operation. Once I delete that file or it completes the work on that file it restarts easily

Sandip C

Senthil Kumar Sekar said...

You can stop such hanging (starting ...) service by following command

sc stop

Though this will throw some error, the service will gets stopped.

Hope this helps

ehowstuff said...

I restart the process and service using Process Explorer. It may helps you as well. Download it here:

ehowstuff said...

I used process explorer to restart the service that stuck in a 'starting' or 'stopping' state.

Anonymous said...

simple, but effective.
cheers mate!

Anonymous said...

You can also visit the step by step procedure at the following link

Jonathan Gozdziewski said...

I know how to stop the service when hung...
sc queryex servicename
taskkill /f /pid pid#

The real question is how to get a specific service started when it keeps freezing on "starting"

No matter how many times you taskkill a frozen "starting" service, it still freezes again when you try to restart it!

How can we find out what is causing the specific service to freeze?

Any help would be appreciated! Thanks!

lee woo said...

Frisbeetarianism is the belief that when you die, your soul goes up on the roof and gets stuck. See the link below for more info.