The Event Viewer uses event IDs to define the uniquely identifiable events that a Windows computer can encounter. For example, when a user’s authentication fails, the system may generate Event ID. So, if when a user logs off a Windows computer and encounters Event ID 7031 or 7034 error, then this post is intended to help. In this post, we will identify the possible cause of this error, as well as present the workaround to help remediate this issue.
Event ID 7031 or 7034 error when user logs off
Let’s take a look at a typical scenario where you can encounter these errors.
You have a device that’s running Windows 11/10 and you have an application or device that runs under the per-user service model. You log off from the device and then log back on.
In this scenario, you may intermittently receive a User log-off notification message from Winlogon. You may also see error events in the System log that resembles the following:
Level: Error
Source: Service Control Manager
Event ID: 7031
Details: The Sync Host_Session1 service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 10000 milliseconds: Restart the service.
Level: Error
Source: Service Control Manager
Event ID: 7034
Details: The Sync Host_Session1 service terminated unexpectedly. It has done this 1 time(s).
Note: The number that appears right after Sync Host_ may vary. For example, the text may read Sync Host_Session1, Sync Host_Session2, and so on. On some Windows 10 version, the text may read something similar to Sync Host_32613.
This Event ID 7031 0r 7034 error occurs because of changes in the way that Service Control Manager cleanly shuts down user services. Specifically, a code-handling session shutdown may terminate a process early.
To work around this issue, exit all open applications and connections before you log off or restart the system.
Read next: