I have a SQL 2017 Enterprise server where more and more VLFs are being consumed and none are being released. Log backups are running every 15 minutes. It is in an AG but this is working correctly (readable secondary is up to date). log_reuse_wait_desc is sys.databases says 'NOTHING'. There are a bunch of open transactions, but according to sys.dm_tran_database_transactions, none are using any bytes of transaction log. Having a bunch of open transactions is pretty normal for this server. The application has always done this (many years) but this is the first time we've experienced this issue. sys.dm_db_log_info() shows I have 343 VLFs with status of 2 - 19 of these have been like this for 2 days now.
Thoughts? My working theory is that some kind of cleanup thread in SQL had died and that bouncing it will probably get things going again but that requires restarting the application which is a nightmare.
EDIT: Despite the bulk of the VLFs being marked as in use (including the ones at the end of the log), I was able to shrink the log file and regrow it. I have bad feeling that this will just have cleaned it up for now though.
Further edit... A colleague sent me https://www.sqlskills.com/blogs/paul/lazy-log-truncation-or-why-vlfs-might-stay-at-status-2-after-log-clearing/ The article linked from that indicated that dbcc sqlperf(logspace) should show the real amount used. This is continuing to go up, ever after log backups.