0X0000042E

Fix ERROR_SERVICE_START_HANG (0X0000042E) in 5 Minutes

Server & Cloud Intermediate 👁 8 views 📅 May 27, 2026

Service hangs in start-pending state? Here's how to kill it fast and fix the root cause—usually a missed dependency or corrupted service config.

Yeah, that error's a pain. You restart a service, it hangs in the start-pending state forever, and no amount of clicking "Stop" helps. The service control manager has locked up, and the only way out is to kill it from the command line. Let's do this.

Quick Fix: Kill the Hung Service

Open an elevated Command Prompt (right-click Run as administrator). Then run this:

sc queryex [servicename]

Replace [servicename] with the actual service name—like Spooler or MSSQL$SQLEXPRESS. Look for the PID (Process ID) in the output. Then kill it:

taskkill /F /PID [PID number]

That'll nuke the process immediately. Now you can restart the service normally with sc start [servicename] or through Services.msc.

If sc queryex shows a PID of 0 (meaning it's stuck in the SCM's internal state), you need a different approach.

When PID Is 0: Hard Reset

Close everything. Run this in the same admin Command Prompt:

sc delete [servicename]

Then immediately re-add it with the correct binary path:

sc create [servicename] binPath= "C:\Path\To\Your\Service.exe" start= auto

Had a client last month whose print spooler did this—PID was 0 after a botched driver update. Deleting and recreating the service took 30 seconds. Fixed it.

Why This Happens

The service control manager (SCM) in Windows expects a service to report "started" within 30 seconds by default. If a service's main thread gets stuck—on a network call, file lock, or deadlock—it never sends that signal. The SCM then shows the start-pending state and won't let you stop it because the service hasn't fully started or stopped. The error code 0X0000042E (which maps to ERROR_SERVICE_START_HANG) is the SCM telling you exactly that: the service timed out while starting.

Most common causes I see:

  • Missing or hung dependency—like a service waiting on an SMB share that's offline
  • Corrupted service configuration from a failed update
  • Anti-virus blocking the service binary at startup
  • Deadlock in custom software (bad code, not your fault)

Less Common Variations

Sometimes the problem isn't the service itself but the service host (svchost.exe). If multiple services share the same host, one stuck service locks them all. Check Event Viewer under Windows Logs > System for Event ID 7000 or 7009—those point to the specific service that's hanging.

Another variation: the service's Recovery tab is set to "Restart the Service" and it loops infinitely. Open Services.msc, right-click the service, go to Recovery, and set first failure to "Take No Action" temporarily. Then restart manually.

For SQL Server services, I've seen this when the instance can't allocate memory due to a locked page setting. Check the SQL Error Log—if you see "Failed to allocate memory for large page", disable Lock Pages in Memory for the SQL service account.

Prevention

First, check dependencies. Run sc qc [servicename] and look at the DEPENDENCIES line. If a dependent service is also stuck or slow, fix that first. I've had backup exec services hang because a remote SQL database was offline—fix the DB, service starts fine.

Second, monitor start times. Use PowerShell to check the last start time of services:

Get-CimInstance -ClassName Win32_Service | Where-Object {$_.State -eq 'Running'} | Select-Object Name, StartName, ProcessId, Started

If a service consistently takes more than 20 seconds to start, investigate—it'll eventually hit the 30-second timeout and hang.

Third, set a realistic timeout. If you've got a legitimate slow service (like a database engine that runs startup scripts), increase the timeout via registry:

HKLM\SYSTEM\CurrentControlSet\Control\ServicesPipeTimeout

Default is 30000 (milliseconds). Bump it to 60000 or 120000. Reboot required.

Don't let this error become a recurring headache. Nuke it, fix the root cause, and move on.

Was this solution helpful?