none
Queue Size RRS feed

  • Question

  • We have noticed that the queue file ("C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue\mail.que") on our Ex2016 servers have been consistently growing.

    We delete the files, and the almost immediately we see a steady growth in size. At the same time we monitoring the Get-Queue command and always have seen a steady and minute amount of message count within the queue (between 0 to 20 or so).

    Is there any way to understand why the queue keeps growing?

    Tuesday, July 9, 2019 2:34 PM

Answers

  • Hi,

    We indeed opened up a case with Premier Support and after consultation what concludes is:

    • The size of the message.queue file is not able to be determined globally, but rather is dependent on many parameters which vary between each organization
    • That said, sometimes a large size such as 1TB can be normal or abnormal, depending on circumstances
    • Each organization needs to monitor the size and once a baseline is created you can ascertain whether or not the present size is abnormal or not.
    • Of course, a sudden spike in size for sure should raise an alarm and you should be monitoring the size of the queue file for such events. On the other hand, a small growth spurt and/or low and steady growth could reflect growing pains in your organization.
    • You can use eseutil probably to determine at any point how much white space there is in the queue file, as you would with any Exchange database
    • There is a script which existed around Ex2010 where you could analyze logs and determine how many messages are incoming/outgoing. With that information you should plug the data into the appropriate cells in the Exchange calculator and make sure your sizing is on target and fits.
    • When monitoring queue size, you have to take into account a few factors, including: (a) send/receive limits per mailbox (Set-Mailbox), (b) per transport service/organization (Set-TransportConfig), (c) and Send Connector (Set-SendConnector)
    • Each level has a limit, whereby a message can be incoming/outgoing and although denied by one level, the other level let it in and caused growth
    • You should leave the SafetyNetHoldTime configuration to the default 2 unless you are tight for space and/or are directed otherwise
    • In our case, to allow safe growth and not impact the server, we were advised to migrate the queue to a dedicated disk where theoretically, should the queue grow abnormally and take up all of the space, there would be little to no impact.

    Good luck!

    Reuvy

    • Marked as answer by Reuvy Tuesday, August 13, 2019 10:21 AM
    Tuesday, August 13, 2019 10:21 AM

All replies

  • Hi Reuvy,

    According to Microsoft the mail.que is an ESE Database, so its similar like to an *.EDB database which holds the mailboxes. So there is currently no build in option to "shrink" the mail.que to a smaller file. The only way to get a smaller mail.que would be to rebuild it. But before we run true the steps to rebuild it, you should check some settings which might caused the issue:

    Hope this link will help you to answer your question.

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


    Cheers,
    Aerrow
    Blog: pdhewaju.com.np
    Please remember to mark the replies as answers.

    Tuesday, July 9, 2019 3:27 PM
  • I don't understand. 

    1. The link points to an article which states that it's applicable to Exchange 2010 Beta...

    2. No where does it mention the "ESE Database" in the above link, so I'm not sure where he get's this from

    3. Even if we believe him, why would it grow so much? Why should the queue hold entire mailboxes?

    Sorry, but the lack of explanation does not help my lack of understanding.

    Wednesday, July 10, 2019 12:19 PM
  • I don't understand. 

    1. The link points to an article which states that it's applicable to Exchange 2010 Beta...

    2. No where does it mention the "ESE Database" in the above link, so I'm not sure where he get's this from

    3. Even if we believe him, why would it grow so much? Why should the queue hold entire mailboxes?

    Sorry, but the lack of explanation does not help my lack of understanding.

    Yes, its an ESE database:

    https://docs.microsoft.com/en-us/exchange/mail-flow/queues/relocate-queue-database?view=exchserver-2019

    It doesnt hold mailboxes, it holds copies of messages. It gets larger on disk because thats the way the ESE architecture works.

    20 messages in a queue is nothing. Its only a problem if it keeps growing and never sends those messages.

    Wednesday, July 10, 2019 12:35 PM
    Moderator
  • Still it makes no sense.

    My average message size, let's say is 1MB. Even if the Queue stores a message temporarily, it should delete it after successfully sending the message. Whey should the Queue file grow to be 100s of GB (even large than some of my Exchange DBs)!

    Is there a setting and/or way to know how many messages are being stored?

    Wednesday, July 10, 2019 2:52 PM
  • Still it makes no sense.

    My average message size, let's say is 1MB. Even if the Queue stores a message temporarily, it should delete it after successfully sending the message. Whey should the Queue file grow to be 100s of GB (even large than some of my Exchange DBs)!

    Is there a setting and/or way to know how many messages are being stored?

    Are you journaling or anything like that? What is your transport config SafetyNetHoldTime set to?

    Wednesday, July 10, 2019 2:58 PM
    Moderator
  • No journaling.

    SafetyNetHoldTime : 2.00:00:00

    Thinking out loud - we are using Circular Logging. Could that influence things?

    Wednesday, July 10, 2019 3:13 PM
  • No journaling.

    SafetyNetHoldTime : 2.00:00:00

    Thinking out loud - we are using Circular Logging. Could that influence things?

    SHouldnt, thats transport versus database logging.

    Any anti-virus or other 3rd party agents installed on the servers?

    Are you at the latest 2016 CU?

    whats the current size of the mail que and how many users do you have?

    Wednesday, July 10, 2019 3:43 PM
    Moderator
  • We are on 2016 CU12.

    Anti-Virus is installed.

    The size of the QUEUE is almost 200GB.

    From common Internet/technet searches seems that this problem is rampant.

    Wednesday, July 10, 2019 3:57 PM
  • We are on 2016 CU12.

    Anti-Virus is installed.

    The size of the QUEUE is almost 200GB.

    From common Internet/technet searches seems that this problem is rampant.

    Is this flat-file anti-virus? And you have excluded the processes and directories?

    https://docs.microsoft.com/en-us/exchange/antispam-and-antimalware/windows-antivirus-software?view=exchserver-2019

    I know alot of people complain about the size of that que DB, but 200GB is rather large ( this w.o knowing the number of users or how many messages and size are sent daily)

    Wednesday, July 10, 2019 4:06 PM
    Moderator
  • Let's assume we have tens of thousands of messages sent daily.

    Let's assume I have a DB which grows 1GB a day. Still, how long should the messages be cached for?

    Wednesday, July 10, 2019 4:18 PM
  • Let's assume we have tens of thousands of messages sent daily.

    Let's assume I have a DB which grows 1GB a day. Still, how long should the messages be cached for?

    2 days - the shadow copies are kept by your settings.  The mail que DB never shrinks in size on disk however. It will use DB white space or grow if none is avail


    Wednesday, July 10, 2019 8:01 PM
    Moderator
  • The messages are kept, even if sent successfully? What for?
    Wednesday, July 10, 2019 8:31 PM
  • The messages are kept, even if sent successfully? What for?

    You have a 2 day safety net. 

    https://docs.microsoft.com/en-us/exchange/mail-flow/transport-high-availability/safety-net?view=exchserver-2019

    How about the anti-virus? Is it correctly excluded?

    Wednesday, July 10, 2019 8:34 PM
    Moderator
  • Hi,

    Except SafetyNetHoldTime, did you check ShadowMessageAutoDiscardInterval and PipelineTracingEnabled which are mentioned in the blog Aerrow provided as well?

    As Andy mentioned, antivirus software should be taken into consideration to configure correctly. Some third-party antivirus software can act on the queue database and it may contribute to the growth of mail.que.

    Regards,

    Lydia 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, July 12, 2019 9:38 AM
    Moderator
  • We opened a case with Premier support. I'll keep you posted.
    Monday, July 15, 2019 4:29 AM
  • Hi,

    That's OK. You are welcomed to post back if you have any updates to share with us. 

    Hope your issue can be solved soon.

    Regards,

    Lydia 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, July 15, 2019 9:28 AM
    Moderator
  • Hi,

    Did you fix the issue successfully?

    If you have solved your problem, could you share with us? Maybe it will help more people with similar problems. 

    Regards,

    Lydia Zhou


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

    Thursday, August 1, 2019 2:12 AM
    Moderator
  • Hi,

    We indeed opened up a case with Premier Support and after consultation what concludes is:

    • The size of the message.queue file is not able to be determined globally, but rather is dependent on many parameters which vary between each organization
    • That said, sometimes a large size such as 1TB can be normal or abnormal, depending on circumstances
    • Each organization needs to monitor the size and once a baseline is created you can ascertain whether or not the present size is abnormal or not.
    • Of course, a sudden spike in size for sure should raise an alarm and you should be monitoring the size of the queue file for such events. On the other hand, a small growth spurt and/or low and steady growth could reflect growing pains in your organization.
    • You can use eseutil probably to determine at any point how much white space there is in the queue file, as you would with any Exchange database
    • There is a script which existed around Ex2010 where you could analyze logs and determine how many messages are incoming/outgoing. With that information you should plug the data into the appropriate cells in the Exchange calculator and make sure your sizing is on target and fits.
    • When monitoring queue size, you have to take into account a few factors, including: (a) send/receive limits per mailbox (Set-Mailbox), (b) per transport service/organization (Set-TransportConfig), (c) and Send Connector (Set-SendConnector)
    • Each level has a limit, whereby a message can be incoming/outgoing and although denied by one level, the other level let it in and caused growth
    • You should leave the SafetyNetHoldTime configuration to the default 2 unless you are tight for space and/or are directed otherwise
    • In our case, to allow safe growth and not impact the server, we were advised to migrate the queue to a dedicated disk where theoretically, should the queue grow abnormally and take up all of the space, there would be little to no impact.

    Good luck!

    Reuvy

    • Marked as answer by Reuvy Tuesday, August 13, 2019 10:21 AM
    Tuesday, August 13, 2019 10:21 AM