Mail.queue DB file is increasing continuously

I am using exchange 2016, its Mail.queue is located on C drive it is continously increasing due to which some times fail flow stopped and after restarting exchange services, it works. Current size is more than 14 GB. I have some of client who are using exchange 2010 and exchange 13, their mail.queue never increase while they have many mailboxes than this. I decreased Safety net time and other thing but stilll increasing. I followed below links.

Every time, Recreating Mail.queue is not possible for.

http://www.admin-enclave.com/en/articles/exchange/296-resolved-exchange-hub-transport-mail-que-file-large-in-size.html 

https://social.technet.microsoft.com/Forums/ie/en-US/c896f0fe-e5ba-4138-92e8-8ce657144112/mailque-file-size-is-rapidly-increasing?forum=exchangesvradmin
LVL 1
Arif KhanSystem AdministratorAsked:
Who is Participating?
 
Arif KhanSystem AdministratorAuthor Commented:
1. Deleted all stuck mail in outbox
2. Set mail flow size to 30 MB for all users
3. Reduced Safety net, Autoshadow, Message expiration from 2 days to 1 day
4. Added defrag key in EdgeTransport.exe.config file
5. Add safety net clear value in EdgeTransport.exe.config file
6. Re-created QUE folder


<add key="SafetyNetHoldTimeInterval" value="1.00:00:00" />
1
 
Sunil ChauhanExpertise in Exchange Server, Office 365 & Powershell ScriptingCommented:
0
 
Arif KhanSystem AdministratorAuthor Commented:
I do not want to change the mail.queue location.

I want to stop its increasing size. Generally if mail is processed, it should automatically get release from Mail.queue but I think either this is not happening or happening very late. I need your support to fix large size 14 GB of mail.queuque
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Sunil ChauhanExpertise in Exchange Server, Office 365 & Powershell ScriptingCommented:
I hope you have already tried the option to restrict the safety Net hold time.

for your information, this seems to be expected behavior and if its growing usually faster then your best option is to move it to a different drive with more space.

https://blogs.technet.microsoft.com/exchange/2013/05/06/ask-the-perf-guy-sizing-exchange-2013-deployments/
https://social.technet.microsoft.com/Forums/lync/en-US/8fe755e5-bbac-470a-8031-727f6d4d64c0/temp-and-mailque-growing-very-large?forum=exchangesvradmin
0
 
Ajit SinghCommented:
May be any third party antivirus/antispam acting on the queue db and causing it to grow.

Also, check if there are any large  attachments stuck in outbox which will cause the db's transport and mdb's to grow in a larger size.

Monitor your queue for any bundles of spam mails.

Get in detailed here:

https://social.technet.microsoft.com/Forums/lync/en-US/8fe755e5-bbac-470a-8031-727f6d4d64c0/temp-and-mailque-growing-very-large?forum=exchangesvradmin

http://expert-advice.org/2017/09/move-truncate-logs-exchange-server-2013/

Hope this helps!
0
 
Arif KhanSystem AdministratorAuthor Commented:
Thank you for your support.

I am trying below.......

To this issue, please refer to the following steps to check if the issue persist:

1. Lower Down the Values of SafetyNetHoldTime, ShadowMessageAutoDiscardInterval, MessageExpirationTimeout

Set-TransportConfig SafetyNetHoldTime 1.00:00:00 >> 1-Day

Set-TransportConfig ShadowMessageAutoDiscardInterval 1.00:00:00  >> 1-Day

Get-TransportService | Set-TransportService -MessageExpirationTimeout 1.00:00:00 >> 1-Day

2. To ensure that transport databases recover the whitespace efficiently, added below keys on Exchange 2016  Edgetransport.exe.Config file in the “C:\Program Files\Microsoft\Exchange Server\V15\Bin”

<add key="QueueDatabaseOnlineDefragSchedule" value="1:00:00" />

<add key="QueueDatabaseOnlineDefragTimeToRun" value="3:00:00" />

<add key="QueueDatabaseOnlineDefragEnabled" value="true" />

3. Restart the transport service.
0
 
Arif KhanSystem AdministratorAuthor Commented:
After above issue, i faced the same issue. I have logged the case with Microsoft, they export mails stuck in OUTBOX using below command. Some heavy size mails were stuck in queue. Deleted it. and recreated QUEUE folder.

get-mailbox -ResultSize Unlimited| Get-MailboxFolderStatistics -folderscope Outbox | Sort-Object Foldersize -Descending | select-object identity,name,foldertype,itemsinfolder,@{Name="FolderSize MB";expression={$_.folderSize.toMB()}} | export-csv OutboxItems.csvget-mailbox -ResultSize Unlimited| Get-MailboxFolderStatistics -folderscope Outbox | Sort-Object Foldersize -Descending | select-object identity,name,foldertype,itemsinfolder,@{Name="FolderSize MB";expression={$_.folderSize.toMB()}} | export-csv OutboxItems.csv


They suggested that in exchange 2010 mail.queue size is 2 GB and exchange 2013/16 its 15 GB. So no worry till 15 GB. I am waiting to grow it more. Will share the steps
0
 
Arif KhanSystem AdministratorAuthor Commented:
This fixed the problem
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.