PlainError

Event ID 7031 and 7034: A service terminated unexpectedly

Updated 2026-12-01 · 6 fixes · expanded guide with sources · how we write fixes

TL;DREvents 7031 and 7034 come from the Service Control Manager in the System log and mean a service crashed: "The Print Spooler service terminated unexpectedly. It has done this 1 time(s)." 7031 adds the recovery action Windows will take (for example, restart the service in 60000 milliseconds); 7034 means no recovery action is set. The crash itself is usually recorded in the Application log at the same time.

Most likely cause: A bug in the program behind the service, or in a plug-in it loads (for print spooler crashes, very often a printer driver)

Try first: Note which service and how often (Get-Service -DisplayName 'Print Spooler' | Format-List Name, DisplayName, Status, StartType)

Likely causes

  1. A bug in the program behind the service, or in a plug-in it loads (for print spooler crashes, very often a printer driver)most likely
  2. Outdated or partly uninstalled third-party software (antivirus, backup agents, OEM utilities, VPN clients)possible
  3. Corrupted Windows system files, for built-in servicespossible
  4. The service was killed by another program, or ran out of memoryless likely

Why this happens

The Service Control Manager starts, stops and watches Windows services. When a service's process exits without telling it, it logs that the service terminated unexpectedly and counts how many times. If the service has recovery actions configured, it logs 7031 and runs the action (restart the service, run a program or restart the computer). If none are configured, it logs 7034. If the recovery action itself fails, it logs 7032.

The SCM only sees the process disappear, so it can't say why. Windows Error Reporting records the actual crash as Event 1000 in the Application log, with the exception code and the faulting module, and that is where the real cause is.

Related service events

How to fix it

Safest first: SafeChanges settingsDangerous
  1. Note which service and how oftenSafe

    The event names the service by its display name and says how many times it has crashed. Find its short service name and current state. Replace the display name with the one in your event.

    Get-Service -DisplayName 'Print Spooler' | Format-List Name, DisplayName, Status, StartType
  2. Find the crash in the Application logSafe

    At the same minute there is usually an Event 1000 "Application Error" (for svchost-hosted services the faulting application looks like svchost.exe_Spooler) or a .NET Runtime 1026 event. The faulting module name shows what crashed. See Event ID 1000 Application Error for reading it.

    Get-WinEvent -FilterHashtable @{LogName='Application'; Id=1000,1026; StartTime=(Get-Date).AddDays(-2)} | Format-List TimeCreated, Id, Message
  3. Check the recovery settingsSafe

    See what Windows does when this service fails. If no actions are set, every crash leaves the service stopped (7034).

    sc.exe qfailure Spooler
  4. Update, repair or remove the software that owns the serviceChanges settings

    For third-party services, install the latest version from the vendor or run its repair option (Settings > Apps > Installed apps). If it belongs to software you no longer use, uninstall it. For Print Spooler crashes, remove printer drivers you don't use and install the current driver from the printer maker; see the print spooler service is not running.

  5. Repair Windows system filesChanges settings

    For built-in Windows services, run DISM and then SFC from an administrator terminal and restart.

    DISM /Online /Cleanup-Image /RestoreHealth; sfc /scannow
  6. Set recovery actions so the service comes backChanges settings

    Services > double-click the service > Recovery tab: set First and Second failure to Restart the Service. Or use sc.exe (reset counter after 1 day, restart after 60 seconds). This keeps things running but doesn't fix the crash.

    sc.exe failure Spooler reset= 86400 actions= restart/60000/restart/60000/restart/60000

Fixing this on several PCs? The Windows Fix & Deploy Toolkit has ready-made PowerShell scripts for it.

For IT admins

If the Application log doesn't show the cause, capture a crash dump of the service process with WER LocalDumps (HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\<process>.exe, DumpType 2 for a full dump) and send it to the vendor. For svchost-hosted Windows services the process is svchost.exe, so scope LocalDumps carefully and remove it afterwards.

Set recovery actions in a GPO or script for business-critical services so a crash restarts them, and alert on 7031/7034 for those services so a crash loop doesn't go unnoticed.

If that didn't fix it

If the service still crashes after updating its software and repairing Windows, collect a crash dump (see For IT admins) and contact the software vendor with it. More event guides: [Windows Event IDs](/windows-event-ids).

When to see a technician

If a security, backup or database service keeps crashing on a business PC or server, get your IT provider to look before you rely on that machine.

Questions people ask

What is the difference between 7031 and 7034?
Both mean the service crashed. 7031 says which recovery action Windows will take; 7034 means no recovery action was configured, so the service stays stopped.
Is one 7031 or 7034 something to worry about?
One crash, after which the service runs fine, usually isn't. Repeated crashes of the same service are worth fixing, especially for security, backup or print services.
Why does Print Spooler keep terminating?
Almost always a bad or outdated printer driver loaded into the spooler. Remove unused printers and drivers and install the current driver from the printer maker.

Sources

Did this fix it? Report a problem

Related errors

All Windows / PC errors →