question

VaishnaviGopalakrishnan-1494 avatar image
0 Votes"
VaishnaviGopalakrishnan-1494 asked Cathyji-msft commented

MSDB Database Mail Shut down

The database mail is shutting down in 10 seconds automatically. Tried all the work around. Nothing worked. Kindly assist.

sql-server-generalsql-server-integration-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered VaishnaviGopalakrishnan-1494 commented

Hi @VaishnaviGopalakrishnan-1494,

What is your SQL server version? Using select @@version to check this. Please read your Database Mail Log to find some useful information, and share us the information for analysis. Management->Database Mail->View Database Mail Log

Did you check the values of Database Mail Executable Minimum Lifetime as below screenshot? SSMS object> Management > Database Mail Configuration Wizard

85969-screenshot-2021-04-09-101008.jpg

Check if this thread could help you.


If the response is helpful, please click "Accept Answer" and upvote it, thank you.



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Cathy,

1) The version is MS SQL Server 2016 (SP2-CU15-GDR)(KB4583461).
2) Mail Log:

4/9/2021 10.44.29AM - DatabaseMail Process is started
4/9/2021 10.44.29AM - Message
1) Exception Information
===================
Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.NoQueueDataException
Message: Database Mail shutting down. Mail queue has been stopped.
Data: System.Collections.ListDictionaryInternal
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Objects.QueueItem GetQueueItemFromCommand(System.Data.SqlClient.SqlCommand)
HelpLink: NULL
Source: DatabaseMailEngine
HResult -2146232832

4/9/2021 10.44.29AM - DatabaseMail Process is shutting down

3) Database Mail Executable Minimum Lifetime is the same as the above screenshot

0 Votes 0 ·

StackTrace Information


at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.QueueDataReader.GetQueueItemFromCommand(SqlCommand c)
at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.QueueDataReader.GetQueueData(Int32 receiveTimeoutSec)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.QueueItemProcesser.GetDataFromQueue(DataAccessAdapter da, Int32 lifetimeMinimumSec)

0 Votes 0 ·
TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered VaishnaviGopalakrishnan-1494 commented
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Tried the resolution now. Still the same issue.

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered VaishnaviGopalakrishnan-1494 commented

The message sounds like it relates to one of the internal Service Broker queues.

What does this query return

SELECT name, is_activation_enabled, is_receive_enabled, is_enqueue_enabled 
FROM msdb.sys.service_queues WHERE name LIKE '%MailQueue'

Now, if any of these queues are stopped, I'm not sure what do with that, but we'll see.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1) I tried this too. Everything that's required is enabled.
2) We tried clearing the queue. Still, even the test mail did not work

0 Votes 0 ·
VaishnaviGopalakrishnan-1494 avatar image
0 Votes"
VaishnaviGopalakrishnan-1494 answered

We got it resolved through a person from Microsoft. He helped our IT guy to fix it.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VaishnaviGopalakrishnan-1494 avatar image
0 Votes"
VaishnaviGopalakrishnan-1494 answered Cathyji-msft commented

Thank you all for your recommendation. I will post the solution if I get to know it. We had a McAfee installation. Our team doubted that it caused the problem.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @VaishnaviGopalakrishnan-1494,

Thanks for sharing. Waiting for your good news.

0 Votes 0 ·