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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sunil ChauhanLead AdministratorCommented:
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
Sunil ChauhanLead AdministratorCommented:
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
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

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:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Arif KhanSystem AdministratorAuthor Commented:
This fixed the problem
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.