SSRS 2012 mails missing when using data driven subscriptions and bulk mail

By | December 23, 2013

Data driven subscriptions (DDS) are a powerful mechanism which can be used to generate mailings. When migrating from SSRS 2008 to 2012 I noticed mails were missing with a DDS containing about 2.000 mails.

This problem occurred in SP1 and Microsoft’s advice was to download the hotfix pack.
http://support.microsoft.com/kb/2894115

After some serious testing the issue seems to be a SMTP server issue.

emailextension!WindowsService_0!1ce0!12/05/2013-15:39:03:: e ERROR: Error sending email. Exception: System.Net.Mail.SmtpException: Failure sending mail. —> System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. —> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
— End of inner exception stack trace —
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.DelegatedStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.DelegatedStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.DelegatedStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.DelegatedStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.DelegatedStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.DelegatedStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.DelegatedStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.DelegatedStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Base64Stream.FlushInternal()
at System.Net.Base64Stream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Mime.MimePart.Send(BaseWriter writer)
at System.Net.Mime.MimeMultiPart.Send(BaseWriter writer)
at System.Net.Mime.MimeMultiPart.Send(BaseWriter writer)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
— End of inner exception stack trace —
at System.Net.Mail.SmtpClient.Send(MailMessage message)

The solution was to get rid of the limits “session size” and “messages per connection”

smtp_settings

Why the issue didn’t occur in SSRS 2008 using the same SMTP server puzzled me. Maybe SSRS 2012 speeds up the processing using multiple threads and overloads the mail server. However I am glad that the update and the new SMTP settings solved my problem.

2 thoughts on “SSRS 2012 mails missing when using data driven subscriptions and bulk mail

  1. Hans vd Berg

    Hey Peter,

    Glad you worked it out!! So it was mainly a SMTP problem after all ;) But wat part of the CU7-update should have helped fixing the problem?

  2. dba60k Post author

    Hi Hans hope all is well with you. This problem is indeed not mentioned as resolved issue in the update. Probably there were some improvements made in the subscriptions engine. However the smtp settings were the main cause of the issue I guess.

Leave a Reply