Is It a Problem?
Almost never in a normal wait profile, because databases do not usually close while the instance is running; it was zero on our SQL Server 2025 lab. Get Wait Statistics does not filter it out, so if it ranks, you will see it. If it does accumulate, the question is why databases are closing at all.
What It Means
Microsoft’s definition: a task waiting for any outstanding log I/Os to finish before shutting down the log while closing the database. Databases close when the instance shuts down, when one is taken offline or detached, and when AUTO_CLOSE closes it after the last user leaves.
Do not confuse it with LOGMGR_QUEUE, which is the log writer idling and is benign.
When It Does Matter
Two situations. A shutdown, offline or detach that hangs while in-flight log writes finish on slow storage; check log write latency per file with Get Database IO Usage. Or databases with AUTO_CLOSE on, closing and reopening:
SELECT name, is_auto_close_on
FROM sys.databases
WHERE is_auto_close_on = 1;
The close itself is asynchronous, but reopening a closed database takes time and can cause application timeouts, so turn it off on anything an application uses: ALTER DATABASE [YourDb] SET AUTO_CLOSE OFF;. The baseline to monitor is no databases with AUTO_CLOSE on outside of desktop use.
The LOG Family
These are the transaction log waits: sessions waiting for log to be written, for room in the log buffer or the log file, and the log writer itself idling. The one that usually costs users time is the main page, WRITELOG.
- WRITELOGLog flush. A session waiting for its log records to be written to disk.The main page for this family
- LOGBUFFERLog buffer. Waiting for space in the log buffer to store a log record.Worth a look when it climbs
- LOGMGR_RESERVE_APPENDLog space. Waiting to see whether truncation frees space in a full log.Worth a look when it climbs
- LOGMGR_FLUSHFlush in progress. Documented for information only; reported as waiting for the current log flush.Usually noise
- LOGMGR_QUEUELog writer idle. The log writer waiting for work requests.Usually noise
- LOGMGRClosing the log. Waiting for outstanding log I/O before the log shuts down as a database closes.Usually noise. This page.
- LOGPOOL waitsLog pool. The in-memory cache of recently flushed log blocks.Usually noise
Where To Go Next
LOGMGR is background noise on a healthy instance. If you are chasing a real problem, start with the waits that cost you time.
- The waits that usually matter, ranked, with what each one is telling you.
- WRITELOG, the log wait that costs users time.
- Performance & Troubleshooting, the scripts and guides for this part of the stack.
Leave a Reply