none
Exchange 2019 Transaction Log Truncation Issue RRS feed

  • Question

  • I have A clean setup of Exchange 2019 on Server 2019 Core.  Everything is working fine (even the muliti-tenancy aspects I am playing with).  After about a Month or so of up-time I noticed that still had thousands of transaction logs for all databases on the system, even though I had enabled circular logging on all databases at the time of their creation.  (It's not in production server even though it has public domains that can receive external emails).  So even though I have circular logging enabled I installed and setup Windows Server Backup to clear logs, still didn't clear.  Finally I decided to disable Circular Logging and re-enable it and the logs cleared when I remounted the databases.  But now about a week later logs still have not cleared again.  I plan to leave circular logging disabled for a couple of days to see if that with just backups log truncation will work as expected.

    Here are some details about the enviornment

    • Server 2019 datacenter Core as a VM on Hyper-V running Server 2019 Datacenter core.
    • Exchange 2019 CU 1
    • Database drive and Log Files drives are on ReFS formatted drives with a mount point of c:\Exchange Data\(Mailbox Logs\Mailbox Database) respectively. (yes volume mount points are not a drive letter)
    • The Underlying storage all vhdx files are on is Deduped using the Data Deduplication Role of the Hyper-V server.

    Please remember to mark my replies as answers if they help

    Friday, April 12, 2019 3:21 PM

Answers

  • So the result shows the correct time of last full backup, right? I meet a similar issue which is caused by that there is no sufficient transaction log churn to exceed the threshold at which truncation is triggered. Combining with the introduction of error 225 in this blog, it seems you can ignore the error. 

    As per the current situation, the result is expected because circular logging starts to truncate logs after remounting database.

    I'm worried that the logs might not be truncated over time, like the situation you mentioned in initial post. If the issue reproduces, please check the checkpoint file and log files. Inactive portion of log files will be removed only when checkpoint file is advanced. If checkpoint file is advanced but no logs are truncated, please check the errors in Event Viewer and post the error here. Then we can do a further investigation. 


    Regards,

    Dawn Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, April 19, 2019 8:47 AM
    Moderator

All replies

  • Hi,

    After enabling circular logging, you need to dismount and mount the databases to apply the change. In some cases, you also need to restart the Information Store service. If you have done those steps but circular logging still doesn't work, you can check the application log in event viewer and see if there is any error associated with the issue. 

    If you plan to use Windows Server Backup to back up Exchange databases, please make sure that circular logging is disabled first. Then, you can make a full backup for those databases periodically to truncate transaction logs.

     

    Regards,

    Dawn Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, April 15, 2019 4:38 AM
    Moderator
  • Thanks, for the reply.

    Yes, I've dismounted the databases, restarted the IS services, and restarted the server.

    Since my initial post I've disabled Circular logging and just had been using windows backup, but it still has not truncated. Looking at the event logs for ESE I see these events for each database when the backup is scheduled to run.

    ID 2005 - Information Store - <Database Name> (13588,G,0,15.02.0330.005) Shadow copy instance 4 starting. This will be a Full shadow copy.
    ID 2001 - Information Store - <Database Name> (13588,G,0,15.02.0330.005) Shadow copy instance 4 freeze started.
    ID 225 - Information Store - <Database Name>(13588,D,105,15.02.0330.005) Mailbox Database 1: No log files can be truncated.  
    ID 2006 - Information Store - <Database Name> (13588,G,0,15.02.0330.005) Shadow copy instance 4 completed successfully. 


    Please remember to mark my replies as answers if they help

    Tuesday, April 16, 2019 5:13 AM
  • Hi,

    It seems that backup is successful but no logs are truncated. Are you making a VSS copy backup or full backup? Please refer to steps in the following documentation and check your procedure.

    Use Windows Server Backup to back up Exchange

    Regards,

    Dawn Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Tuesday, April 16, 2019 7:46 AM
    Moderator
  • Yes, I was doing a full VSS backup.  I had actually reviewed that guidance already figuring I missed something.  When I do run the command listed at the end to verify I get the following for each database.

    Get-MailboxDatabase -Status | Format-List Name,*FullBackup
    
    Name                   : <Database Name>
    SnapshotLastFullBackup : True
    LastFullBackup         : 4/15/2019 9:00:22 PM

    I did switch back to circular logging with the backups off, and have noted that it will only trim log files if I dismount and remount the datbase.  even if no settings have changed.


    Please remember to mark my replies as answers if they help

    Tuesday, April 16, 2019 4:29 PM
  • So the result shows the correct time of last full backup, right? I meet a similar issue which is caused by that there is no sufficient transaction log churn to exceed the threshold at which truncation is triggered. Combining with the introduction of error 225 in this blog, it seems you can ignore the error. 

    As per the current situation, the result is expected because circular logging starts to truncate logs after remounting database.

    I'm worried that the logs might not be truncated over time, like the situation you mentioned in initial post. If the issue reproduces, please check the checkpoint file and log files. Inactive portion of log files will be removed only when checkpoint file is advanced. If checkpoint file is advanced but no logs are truncated, please check the errors in Event Viewer and post the error here. Then we can do a further investigation. 


    Regards,

    Dawn Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, April 19, 2019 8:47 AM
    Moderator
  • Hi,

     

    How is everything going?

     

    If there is any update, feel free to let me know. If the reply helps, kindly mark it as answer, which will be beneficial for answer searching in the forum.

     

    Thanks for your understanding.


    Regards,

    Dawn Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, April 26, 2019 9:42 AM
    Moderator
  • Thanks for the info Dawn.  I've not actually been able to look over the blog you linked.  I will be looking at it this weekend.

    From what I recall when I was looking earlier it seems that the checkpoint is not being advanced until the database is dismounted and remounted.

    I'm just wondering if I am seeing this issue because I decided to try something unorthodox by putting the mount point for the database and log folder volumes are a path instead of a letter, is it a the volumes are formatted ReFS problem, or even a bug in 2019 CU1


    Please remember to mark my replies as answers if they help

    Friday, April 26, 2019 5:25 PM
  • Circular logging won't truncate log files when the checkpoint file is not advanced. Full backup might not truncate logs if there are insufficient logs as mentioned above. If that's your case, the issue is normal. As per my understanding, it has nothing to do with log file location and disk format. 


    Regards,

    Dawn Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, April 29, 2019 9:49 AM
    Moderator
  • We are experiencing the same.  We run full backups with VSS and see the same as @vtron21 listed.  We can clearly see the checkpoint does not change unless we manually stop/start services and then run a backup.  There were a couple mentions about insufficient logs or not enough churn for the checkpoint to change.  What is considered sufficient data?  I don't understand why you wouldn't want them to truncate after a full backup.  This just means you have to replay more transaction logs in the event of a restore.  

    Would like to get a clear understanding of what is considered enough transaction logs or what determines when the checkpoint file/date changes.

    Thursday, May 16, 2019 12:16 AM
  • The same problem...

    Regards,
    Michael

    • Proposed as answer by Manorizz Monday, August 5, 2019 7:46 PM
    • Unproposed as answer by Manorizz Monday, August 5, 2019 7:46 PM
    Thursday, May 16, 2019 2:21 PM
  • Hi  All,  the same here in my environment!!

    I have installed a DAG composed by 2 nodes (exchange 2019 on windows server 2019) and when I try to run the WBS, the operation in the event is done, but the event 225 appear , and the logs aren't truncated.

    If we read this link, https://docs.microsoft.com/it-it/exchange/high-availability/disaster-recovery/backup-with-windows-server-backup?view=exchserver-2019 it looks like that this must be done correctly by the WBS.

    Where is the issue?

    Why we haven't any error in the event viewer?

    Regards, 

    Manolo

    Monday, August 5, 2019 7:52 PM
  • short add on: If I destroy my DAG AND I run the backup, tha logs are truncated!!
    Monday, August 5, 2019 7:53 PM
  • It may not be that you destroyed your DAG but rather that you restarted your services.  I found that if we manually stop/start Exchange services and then run it, the logs are truncated successfully.  
    Monday, August 5, 2019 8:55 PM
  • So the result shows the correct time of last full backup, right? I meet a similar issue which is caused by that there is no sufficient transaction log churn to exceed the threshold at which truncation is triggered. Combining with the introduction of error 225 in this blog, it seems you can ignore the error. 

    As per the current situation, the result is expected because circular logging starts to truncate logs after remounting database.

    I'm worried that the logs might not be truncated over time, like the situation you mentioned in initial post. If the issue reproduces, please check the checkpoint file and log files. Inactive portion of log files will be removed only when checkpoint file is advanced. If checkpoint file is advanced but no logs are truncated, please check the errors in Event Viewer and post the error here. Then we can do a further investigation. 


    Regards,

    Dawn Zhou

    So coming back to this.  I've had the Exchange server running for a while now and it is truncating logs.  Even with the backup being done by the hyper-visor instead of on the exchange server. 

    So the real issue is, the server is just not busy enough for logs to truncate daily with backups or circular logging

    Once I enabled one of my reporting scripts to the admin mailbox I did start to see more log churn


    Please remember to mark my replies as answers if they help

    Thursday, September 19, 2019 4:48 PM