Exchange ServerTroubleshooting

Exchange transaction logs filling the disk: backups, circular logging and safe recovery

Log volume filling up or databases dismounting? Find out why Exchange isn't truncating logs, free space safely with a backup or circular logging, and never delete logs by hand.

Exchange never changes a database without writing the change to a transaction log first, so the log volume is the first thing to fill up when backups quietly stop working or a migration is running. When it hits zero, the database dismounts and everyone on it is offline. In this post I'll show why logs aren't being truncated, how to buy space without losing data, and how to use circular logging deliberately rather than in a panic.

Errors this guide fixes

  • Unable to create a new logfile because the database cannot write to the log drive.Application log (ESE event 413)
  • Database recovery/restore failed with unexpected error -510.Application log (ESE)
  • Event ID 413 (ESE)Application log
How this guide is organised: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (6 steps: Work out how much time you have; Don't delete log files; Get the backup working; Use circular logging as a controlled tool; Find what is generating the logs; If the database already dismounted). 4. Verify the fix. 5. Prevent it next time. Toolbox: Event ID 413, E01000A2F3C.log, Get-StoreUsageStatistics, Get-MoveRequest, Get-MailboxImportRequest.1Symptoms2Why it happens3How to fix it4Verify the fix5Prevent it nexttime1Work out howmuch time yo…2Don't deletelog files3Get the backupworking4Use circularlogging as a c…5Find what isgenerating th…6If the databasealready dismo…TOOLBOXEvent ID 413E01000A2F3C.logGet-StoreUsageStatisticsGet-MoveRequestGet-MailboxImportRequestHow this guide is organised: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (6 steps: Work out how much time you have; Don't delete log files; Get the backup working; Use circular logging as a controlled tool; Find what is generating the logs; If the database already dismounted). 4. Verify the fix. 5. Prevent it next time. Toolbox: Event ID 413, E01000A2F3C.log, Get-StoreUsageStatistics, Get-MoveRequest, Get-MailboxImportRequest.1Symptoms2Why it happens3How to fix it1Work out how much time you have2Don't delete log files3Get the backup working4Use circular logging as a controlled tool5Find what is generating the logs6If the database already dismounted4Verify the fix5Prevent it next timeTOOLBOXEvent ID 413E01000A2F3C.logGet-StoreUsageStatisticsGet-MoveRequestGet-MailboxImportRequest
At a glance: how this guide is organised · 6 fix steps · 5 key tools

Symptoms#

The Application log shows ESE event 413:

Text
Unable to create a new logfile because the database cannot write to the log drive. The drive may be read-only, out of disk space, misconfigured, or corrupted.

Around it you typically see:

  • Free space on the log volume falling fast, with thousands of 1 MB files named after the database's log prefix (for example E01000A2F3C.log).
  • The database dismounted: Get-MailboxDatabase -Status shows Mounted : False and Outlook disconnects.
  • After space is freed, mount attempts failing with recovery errors such as Database recovery/restore failed with unexpected error -510.
  • In a DAG, logs growing on every copy, not just the active one.

Why it happens#

Logs are removed (truncated) in only two ways: after an Exchange-aware full or incremental backup completes through the Exchange VSS writer, or continuously when circular logging is enabled. A DAG adds a condition: a log can only be truncated once every copy has copied and inspected it and the non-lagged copies have replayed it, while lagged copies keep logs for their lag period. Anything that breaks those conditions, or generates logs faster than usual, fills the disk:

CauseHow to spot it
No Exchange-aware backup, or the job runs as a copy or file-level backupLastFullBackup is old or empty
The backup reports success but the VSS writer failedvssadmin list writers shows the Exchange writer with an error
Mailbox moves, migrations or PST imports into the databaseGet-MoveRequest, Get-MailboxImportRequest
A mail loop or a misbehaving client hammering one mailboxMessage tracking, Get-StoreUsageStatistics
A DAG copy that is suspended, failed or far behindGet-MailboxDatabaseCopyStatus

How to fix it#

1. Work out how much time you have#

On the server that hosts the active copy, count the logs, then repeat after 30 minutes to see the rate:

PowerShell
$db = Get-MailboxDatabase DB01
$logs = Get-ChildItem -Path "$($db.LogFolderPath)" -Filter "$($db.LogFilePrefix)*.log"
"{0} logs, {1:N1} GB" -f $logs.Count, (($logs | Measure-Object -Property Length -Sum).Sum / 1GB)
Get-MailboxDatabase -Status | Format-Table Name, Mounted, LastFullBackup, LastIncrementalBackup, CircularLoggingEnabled -AutoSize

If the volume will be full within hours, extend it first. Adding space is the only fix with no side effects.

2. Don't delete log files#

Logs newer than the checkpoint hold changes that aren't in the .edb file yet; deleting them leaves the database in Dirty Shutdown with data loss. Older logs are your roll-forward chain for a restore, and in a DAG the passive copies may still need them. Leave the small reserve log files in the folder alone too — ESE keeps them so it can shut the database down cleanly when the disk fills.

3. Get the backup working#

Command Prompt
vssadmin list writers

The Microsoft Exchange Writer (since Exchange 2013 it runs inside the Microsoft Exchange Replication service and handles active and passive copies alike) should show State: [1] Stable and Last error: No error. Configure the job as an application-aware full backup of the databases, run it, and check that LastFullBackup updates. Truncation follows the completed backup; in a DAG it then happens on every copy once replication catches up.

4. Use circular logging as a controlled tool#

PowerShell
Set-MailboxDatabase DB01 -CircularLoggingEnabled $true

On a database without copies this is JET circular logging, which takes effect only after Dismount-Database DB01 and Mount-Database DB01. On a database with DAG copies it's continuous replication circular logging (CRCL), which applies immediately without a dismount.

Watch out: with circular logging on you can only take full backups and restore to the last one — no rolling forward to the point of failure. Use it to get through a migration or an outage, then set -CircularLoggingEnabled $false (dismounting and mounting again if the database has no copies) and take a full backup straight away.

Running CRCL permanently is a sound design only as part of Exchange Native Data Protection, with enough DAG copies — often including a lagged copy — to stand in for backups.

5. Find what is generating the logs#

PowerShell
Get-MoveRequest -MoveStatus InProgress
Get-StoreUsageStatistics -Database DB01 | Sort-Object TimeInServer -Descending | Select-Object -First 10
Get-MessageTrackingLog -Start (Get-Date).AddHours(-1) -EventId DELIVER -ResultSize Unlimited |
  Group-Object { $_.Recipients -join ';' } | Sort-Object Count -Descending | Select-Object -First 10 Count, Name

Moves into a database generate roughly as much log data as the mailboxes they bring in, so schedule or throttle migration batches (see hybrid migration batches). Get-StoreUsageStatistics lists the busiest mailboxes on the database, and a recipient receiving thousands of deliveries an hour usually points to a mail loop or a runaway application.

6. If the database already dismounted#

Free space with one of the steps above, then run Mount-Database DB01; ESE replays the outstanding logs during the mount. If it refuses, follow Exchange database won't mount. In a DAG, also resume or reseed any copies that failed while the disk was full.

Verify the fix#

  • The log count from step 1 drops shortly after the backup completes, and the growth rate returns to your normal baseline.
  • LastFullBackup shows today's date and CircularLoggingEnabled has the value you intend.
  • Get-MailboxDatabaseCopyStatus DB01\* shows Healthy copies with low CopyQueueLength and ReplayQueueLength.
  • The database is mounted and no new ESE 413 events appear.

Prevent it next time#

  • Size log volumes for your daily log generation multiplied by the number of days a backup could be missed, plus headroom for migrations.
  • Alert on free space early, and on the age of LastFullBackup rather than trusting the backup console alone.
  • Before a large migration, increase backup frequency or enable circular logging temporarily — and plan the full backup that follows.
  • Keep logs off the system drive and off the volume that holds the transport queue database, so a filling log drive can't also trigger back pressure.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)