Came across a interesting situation earlier this week that I had not come across before. All email messages in this small (<100 users) Exchange 2010 SP2 environment where being delayed at random intervals between a few minutes and 30 minutes. Checking the event logs, services and exchange management console did not show any real problems. Only one message was logged in the application log. Task manager did show issues as the transport service was up to several GB in memory and CPU over standard.
The execution time of agent ‘Journal Agent’ exceeded 90000 milliseconds while handling event ‘OnRoutedMessage’ for message with InternetMessageId: ‘Not Available’. This is an unusual amount of time for an agent to process a single event. However, Transport will continue processing this message.
Event ID 1050 Source MSExchange Extensibility
I checked the queue viewer and found that one of the queues for a mailbox database was in a connecting status. Upon further investigation I found some messages delivering and others being delayed before delivery. I found one message that was very large in size being delayed the longest. I attempted to suspend the message and was not able to given an error. It appears that this message was stuck, can’t delete or remove etc. After a long attempts at powershell to remove and suspend messages I had to delete and create a queue, its a fairly simple process here are the steps:
Note: If messages are in the queue when you stop and delete the queue they are lost, there is lossless methods to remove the Queue database.
- Stop Exchange Transport Service
- Browse to the queue in explorer, if its defaults its located at (C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\data\Queue)
- Move the mail.que database file to a new folder inside the queue root.
- Start the transport service
This will create a folder called queue.old and place all logs and databases inside of it. It will also create a new queue database and messages should return.Technet – Managing the Queue Database