In the past, while testing with a large volume of messages in a lab environment on one of my client machines, the processes started to get suspended with the following error:
Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘MyAssembley.Orchestrations.Service (6dbc699a-a109-9141-f05e-444b065a1a09)’.
The service instance will remain suspended until administratively resumed or terminated. If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 514f5f29-f720-44d9-8f9e-3750734ca380
Shape name: Response Error Construct Msg
ShapeId: 3dbb377a-e842-426d-b162-405d8d87f093
Exception thrown from: segment 3, progress 3
Inner exception: The event log file is fullException type: Win32Exception
Source: System
Target Site: Void InternalWriteEvent(UInt32, UInt16, System.Diagnostics.EventLogEntryType, System.String[], Byte[], System.String)
The following is a stack trace that identifies the location where the exception occurred at System.Diagnostics.EventLog.InternalWriteEvent(…)
📝 One-Minute Brief
In high-volume BizTalk environments, service instances can unexpectedly suspend with a “Win32Exception: The event log file is full” error. This occurs because the Windows Event Viewer has reached its maximum size limit and is not configured to overwrite old entries. BizTalk attempts to log an event, fails, and suspends the orchestration. To fix this, you must increase the Maximum log size and set the retention policy to “Overwrite events as needed.”
Cause
BizTalk Server is deeply integrated with the Windows Event Log. When an orchestration or adapter attempts to log a warning, error, or information event, it makes a call to the Windows Event Viewer. If the Application log has reached its maximum size and is configured not to overwrite old events, the write operation fails, throwing a Win32Exception.
The event viewer is not properly configured, and it reached the maximum limit of the log file. This causes it to throw this type of exception when we try to write in the Event Viewer.
Solution
Configure the event in question with the following settings:
- Maximum log size (Kb): 20489 – that is 20 MB, which gives us a comfortable history of events.
- And the option Overwrite events as needed (oldest events first) is selected, with this option we prevent the log to exceeding its limits, avoiding this kind of error.