Fix ERROR_EVT_MAX_INSERTS_REACHED (0x3AB7) on Windows
Your Event Viewer's hit the insert limit. Here's how to clear it in three steps, starting with a 30-second fix.
Ran into ERROR_EVT_MAX_INSERTS_REACHED (error code 0x00003AB7) while trying to view or export Windows Event Logs? Happens more than you'd think. I've seen this on everything from a client's Windows 10 workstation to a Server 2019 box that hadn't had its logs cleaned in years.
The message reads: "The maximum number of replacements has been reached". Basically, Windows Event Log has a built-in limit on how many replacement strings (inserts) it can handle per event. When a log file gets huge or corrupted, that limit gets hit and Event Viewer throws a tantrum.
Here's the fix, going from quickest to most thorough. You can stop as soon as your problem's gone.
Try this first: 30-second fix
Before you start digging into event logs, try the simplest thing: restart the Windows Event Log service. This clears the in-memory cache of insert strings and often fixes the error immediately.
- Open Services.msc (Win+R, type
services.msc, hit Enter). - Find Windows Event Log in the list.
- Right-click it and choose Restart. This stops and restarts the service.
- Wait five seconds, then open Event Viewer again and try to view the log that was failing.
This worked for my client's Windows 10 laptop that was showing the error on the System log. Fixed in under a minute. If the error comes back after a few hours, move on to the next step.
Still broken? 5-minute fix: Clear the log with wevtutil
If the restart didn't stick, the log file itself is probably too big or partially corrupted. You need to clear it. Don't bother clearing it through Event Viewer's GUI — it'll hang on the same error. Use wevtutil from an admin command prompt instead.
- Open Command Prompt as Administrator (right-click Start > Command Prompt (Admin) or Windows Terminal (Admin)).
- Type the following command, replacing
Applicationwith the log name that's giving you trouble (likeSystem,Security, orWindows PowerShell):
wevtutil cl Application
The cl flag stands for "clear log". This wipes the entire log file. Don't panic — Windows will start writing new events immediately. If you need to keep the old logs, first export them to a file:
wevtutil epl Application C:\backup\applog.evtx
Then clear the original.
I've used this on a Server 2012 R2 box that hadn't been cleaned in three years. The System log was 200MB and completely unreadable. wevtutil cl System fixed it in two seconds, and Event Viewer opened normally again.
If the error persists even after clearing, the log file itself might be damaged. Move to the advanced fix.
Advanced fix: Delete and recreate the log file (15+ minutes)
When wevtutil cl fails or gives you the same error, the log file is physically corrupted on disk. Deleting the file and letting Windows recreate it is the nuclear option, but it works.
Warning: This deletes all historical events in that log. Back up what you need first using the export command above.
- Open Command Prompt as Administrator.
- Stop the Event Log service so it releases the file:
net stop eventlog
- Navigate to the log file location. On most systems, it's:
C:\Windows\System32\winevt\Logs\
- Find the file matching your log. For example,
Application.evtx,System.evtx,Security.evtx. Right-click and delete it. You might need to take ownership first — if you get a permissions error, use these commands:
takeown /f "C:\Windows\System32\winevt\Logs\Application.evtx"
icacls "C:\Windows\System32\winevt\Logs\Application.evtx" /grant Administrators:F
- Now restart the Event Log service:
net start eventlog
- Windows will automatically create a fresh, empty log file. Open Event Viewer and check your log — the error should be gone.
Had a call from a small law firm last year whose server couldn't write any new security events because of this error. The Security.evtx file was 300MB and had a corrupt section. Deleting it and restarting the service rebuilt the log instantly. They lost about 6 months of old audit entries (they had no backup — I know, not great), but the server was logging again within minutes.
Prevent it from coming back
Once you've got it working, set a reasonable log size limit to stop the insert counter from hitting the ceiling again. In Event Viewer, right-click a log (like Application) > Properties, and set the maximum log size to something sane — 20MB is plenty for most systems. Also enable Overwrite events as needed so old entries get recycled automatically.
If you're managing multiple machines, set this via Group Policy: Computer Configuration > Administrative Templates > Windows Components > Event Log Service. Crank the size down for logs you don't need to keep forever.
That's it. Three fixes, one works for sure. Start with the restart, move to wevtutil, and only nuke the file if you have to. You'll be back to reading error logs in no time.
Was this solution helpful?