Data-driven Subscription doesnt send out an email but job history shows its successfull

Hi All

Please give me some advice about this Data-driven Subscription runs every hour misses out once or twice a day, but the subscription job history shows it ran sucessfull but it doesnt trigger the e-mail out.

Is there a way to check on subscription logs that SSRS has triggered the report out to the e-mail server.

Is there a way to add add logs for the e-mail part to make sure it has sent out the email ?

Nothing in the E-mail server logs to show this report email was requested / delivered / rejected by it.

So - Kindy advice me how can I proceed my findings on this.

Thanks a lot in advance.

October 29th, 2014 10:39am

Hi xXShanXx,

Based on your description, you have created a Data-driven Subscription and schedule to run every hour a day, but missed to receive some of the emails a day sometime, you have checked the subscription job history and the LastStatus show successfully, right?

Generally, Successful delivery means that there were no errors generated by the Scheduling and Delivery Processor, and that the report server connected to the mail server. So in your scenario the issue can be resulted in an undeliverable in the user mailbox, What happens to the e-mail after that we need to investigate within the e-mail system but not RS.

But if you can find record in these two tables: ReportServer.dbo.Notifications; ReportServer.dbo.Event; related to this subscription, the problem can be caused by the event processing threads are all tied and not processing the events as fast as they arrive, so you will not receive emails timely.

Please check information one by one to find the root cause:

1.  Double check query below to make sure the fields LastStatus really give the successful information and LastRun time is correct ,the value of ScheduleId is the same with the Job and then make sure that you havent accidentally disabled the jobs.
This query shows how the subscription information is stored in the various related tables, along with the most useful information you will need to diagnose issues later:

use ReportServer
select 
'ScheduleId' = rs.ScheduleId,
'SubnDesc' = s.Description,
'SubnOwner' = us.UserName,
'LastStatus' = s.LastStatus,
'LastRun' = s.LastRunTime,
'ReportPath' = c.Path,
'ReportModifiedBy' = uc.UserName,
'SubscriptionId' = s.SubscriptionID
from ReportServer.dbo.Subscriptions s
join ReportServer.dbo.Catalog c on c.ItemID = s.Report_OID
join ReportServer.dbo.ReportSchedule rs on rs.SubscriptionID = s.SubscriptionID
join ReportServer.dbo.Users uc on uc.UserID = c.ModifiedByID
join ReportServer.dbo.Users us on us.UserID = s.OwnerId
join msdb.dbo.sysjobs j on j.name = CONVERT(nvarchar(128),rs.ScheduleId)

2.  check two tables below in the reportServer DB:
ReportServer.dbo.Notifications;
ReportServer.dbo.Event.
If these table have information, take reference as below:
This main issue is the event processing threads are all tied and not processing the events as fast as they arrive. You will see that the agent jobs are firing, but the Events and Notifications tables have a large number of entries. The number of threads is fixed, you cannot increase it, so you need to figure out what they are processing and why they are not firing or keeping up. You can get the subscription and report information, and run the report or the data driven query manually to see if they are healthy, if several instances of the event were running at the same time occupying all of the threads, and nothing else was getting executed. You may also notice that everything is healthy, but there are common hotspot times in the day (for example, 8am or midnight) when a lot of subscriptions are set to fire at the same time, and they may take a long time to complete, so the subscription processing cannot keep up and falls behind. In this case, you may encouraged to run them at different times if possible, or you could consider adding a second reporting server configured as a two node NLB cluster with the other. In this case, both servers will be polling the events table in the RS catalog and processing the events in parallel.

3.  you can check the detailed error log (default location: %programfiles%\Microsoft SQL Server\<SQL Server Instance>\Reporting Services\LogFiles),
Please check the log and give us more information to move more quickly toward a solution.

Below blogs are for your reference about Troubleshooting Subscriptions:
http://blogs.msdn.com/b/deanka/archive/2009/01/13/diagnosing-and-troubleshooting-subscriptions.aspx
http://blogs.msdn.com/b/deanka/archive/2010/02/16/troubleshooting-subscriptions-part-ii-using-the-report-services-trace-log-file.aspx
If you still have any question, please feel free to ask.

Regards
Vicky Liu

Free Windows Admin Tool Kit Click here and download it now
October 30th, 2014 9:49am

Thanks a lot Vicky Liu - really appreciate your guidance. I will go thro these checks and i will come back
October 31st, 2014 11:57am

Hi Vicky Liu

I got Reporting Services LogFiles and can seethe error now. 

  • If its a failure, then why did it update the subscription job history as success ? 
  • Is there a way to monitor this log files and alert when it fails ?

Can you advice me what can be dome with this log life ?

Timeout error :

ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'SSRSSRV02_interface'., ;
 Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'SSRSSRV02_interface'. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Email Error:

ReportingServicesService!notification!3!10/30/2014-22:38:33:: Notification faac99a8-48a2-4262-b699-f798589a2ecc completed.  Success: False, Status: Failure sending mail: An error has occurred during report processing., DeliveryExtension: Report Server Email, Report: 9105 - ALERT - Negative Margin by Destination Account, Attempt 0


  • Edited by xXShanXx Friday, October 31, 2014 2:53 PM
Free Windows Admin Tool Kit Click here and download it now
October 31st, 2014 1:42pm

Report Server Service logs below

ReportingServicesService!dbpolling!11!30/10/2014-22:37:10:: i INFO: EventPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!e!30/10/2014-22:37:10:: i INFO: EventPolling processing item 1f4ae9bb-5283-4756-866b-e794ddb8fc75
ReportingServicesService!library!e!30/10/2014-22:37:13:: i INFO: Schedule 88486172-a685-428a-a138-cc1efd7d16f8 executed at 30/10/2014 22:37:13.
ReportingServicesService!schedule!e!30/10/2014-22:37:13:: Creating Time based subscription notification for subscription: 859722ed-ab17-4357-8bab-5c068ede6366
ReportingServicesService!library!e!30/10/2014-22:37:13:: i INFO: Schedule 88486172-a685-428a-a138-cc1efd7d16f8 execution completed at 30/10/2014 22:37:13.
ReportingServicesService!dbpolling!e!30/10/2014-22:37:16:: i INFO: EventPolling finished processing item 1f4ae9bb-5283-4756-866b-e794ddb8fc75
ReportingServicesService!dbpolling!11!30/10/2014-22:37:16:: i INFO: EventPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!e!30/10/2014-22:37:16:: i INFO: EventPolling processing item 17027403-5870-487b-93ab-f8d54a646b77
ReportingServicesService!dbpolling!e!30/10/2014-22:37:17:: i INFO: EventPolling finished processing item 17027403-5870-487b-93ab-f8d54a646b77
ReportingServicesService!dbpolling!11!30/10/2014-22:37:22:: i INFO: NotificationPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!3!30/10/2014-22:37:22:: i INFO: NotificationPolling processing item faac99a8-48a2-4262-b699-f798589a2ecc
ReportingServicesService!library!3!10/30/2014-22:37:22:: i INFO: Call to RenderFirst( '/Narrowcaster_SSRS/9105 - ALERT - Negative Margin by Destination Account' )
ReportingServicesService!runningjobs!e!30/10/2014-22:37:59:: i INFO: Adding: 1 running jobs to the database
ReportingServicesService!processing!3!30/10/2014-22:38:31:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'SSRSSRV02_interface'., ;
 Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'SSRSSRV02_interface'. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
   at System.Data.SqlClient.TdsParserStateObject.ReadByte()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.DataExtensions.SqlCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   --- End of inner exception stack trace ---
ReportingServicesService!processing!3!30/10/2014-22:38:31:: e ERROR: An exception has occurred in data source 'SSRSSRV02_interface'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'SSRSSRV02_interface'. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
   at System.Data.SqlClient.TdsParserStateObject.ReadByte()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.DataExtensions.SqlCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.FirstPassInit()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPassProcess(Boolean& closeConnWhenFinish)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.Process()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.ProcessConcurrent(Object threadSet)
ReportingServicesService!processing!3!30/10/2014-22:38:31:: i INFO: Merge abort handler called for ID=-1. Aborting data sources ...
ReportingServicesService!dataextension!3!30/10/2014-22:38:31:: w WARN: CommandWrapper.Cancel not called, connection is not valid
ReportingServicesService!processing!3!30/10/2014-22:38:31:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
 Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'SSRSSRV02_interface'. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
   at System.Data.SqlClient.TdsParserStateObject.ReadByte()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.DataExtensions.SqlCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.FirstPassInit()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPassProcess(Boolean& closeConnWhenFinish)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.Process()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.ProcessConcurrent(Object threadSet)
   --- End of inner exception stack trace ---
ReportingServicesService!processing!3!30/10/2014-22:38:31:: w WARN: Data source 'SSRSSRV02_interface': Report processing has been aborted.
ReportingServicesService!processing!3!30/10/2014-22:38:31:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
 Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'SSRSSRV02_interface'. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
   at System.Data.SqlClient.TdsParserStateObject.ReadByte()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.DataExtensions.SqlCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.FirstPassInit()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPassProcess(Boolean& closeConnWhenFinish)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.Process()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.ProcessConcurrent(Object threadSet)
   --- End of inner exception stack trace ---
ReportingServicesService!library!3!10/30/2014-22:38:31:: i INFO: Initializing EnableExecutionLogging to 'True'  as specified in Server system properties.
ReportingServicesService!emailextension!3!10/30/2014-22:38:33:: Error sending email. Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'SSRSSRV02_interface'. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
   at System.Data.SqlClient.TdsParserStateObject.ReadByte()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.DataExtensions.SqlCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.FirstPassInit()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPassProcess(Boolean& closeConnWhenFinish)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.Process()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.ProcessConcurrent(Object threadSet)
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ProcessingContext.AbortHelper.ThrowAbortException(Int32 reportUniqueName)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ProcessingContext.CheckAndThrowIfAborted()
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.Merge.Process(ParameterInfoCollection parameters, Boolean mergeTran)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ProcessReport(Report report, ProcessingContext pc, ProcessingContext context)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ProcessReport(Report report, ProcessingContext pc, Boolean snapshotProcessing, Boolean processWithCachedData, GetReportChunk getChunkCallback, ErrorContext errorContext, DateTime executionTime, CreateReportChunk cacheDataCallback, ProcessingContext& context)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean& dataCached)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc)
   at Microsoft.ReportingServices.Library.RSService.RenderAsLive(CatalogItemContext reportContext, ItemProperties properties, ParameterInfoCollection effectiveParameters, Guid reportId, ClientRequest session, String description, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection thisReportDataSources, Boolean cachingRequested, Boolean isLinkedReport, Warning[]& warnings, ReportSnapshot& resultSnapshotData, DateTime& executionDateTime, RuntimeDataSourceInfoCollection& alldataSources, UserProfileState& usedUserProfile)
   at Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)
   at Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
   at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
   at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
   at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService rs, CatalogItemContext reportContext, ClientRequest session, JobType type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
   at Microsoft.ReportingServices.Library.ReportImpl.Render(String renderFormat, String deviceInfo)
   at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
   at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
   at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
ReportingServicesService!library!3!10/30/2014-22:38:33:: Data Driven Notification for activation id fb8257a8-85c2-4438-9eda-640f33e5e695 was saved.
ReportingServicesService!library!3!10/30/2014-22:38:33:: Status: Failure sending mail: An error has occurred during report processing.
ReportingServicesService!notification!3!10/30/2014-22:38:33:: Notification faac99a8-48a2-4262-b699-f798589a2ecc completed.  Success: False, Status: Failure sending mail: An error has occurred during report processing., DeliveryExtension: Report Server Email, Report: 9105 - ALERT - Negative Margin by Destination Account, Attempt 0
ReportingServicesService!dbpolling!3!10/30/2014-22:38:34:: i INFO: NotificationPolling finished processing item faac99a8-48a2-4262-b699-f798589a2ecc
ReportingServicesService!dbpolling!11!30/10/2014-22:40:17:: i INFO: EventPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!3!30/10/2014-22:40:17:: i INFO: EventPolling processing item b6d83c57-cd6a-4950-a798-b36b66cbfc7a
ReportingServicesService!library!3!30/10/2014-22:40:19:: i INFO: Schedule 8d08cd19-0c18-42ac-ae1c-68aafc695717 executed at 30/10/2014 22:40:19.
ReportingServicesService!schedule!3!30/10/2014-22:40:19:: Creating Time based subscription notification for subscription: 907abd66-3757-43ef-9318-5446f200d58d
ReportingServicesService!library!3!30/10/2014-22:40:19:: i INFO: Schedule 8d08cd19-0c18-42ac-ae1c-68aafc695717 execution completed at 30/10/2014 22:40:19.
ReportingServicesService!dbpolling!3!30/10/2014-22:40:20:: i INFO: EventPolling finished processing item b6d83c57-cd6a-4950-a798-b36b66cbfc7a
ReportingServicesService!dbpolling!11!30/10/2014-22:40:21:: i INFO: EventPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!3!30/10/2014-22:40:21:: i INFO: EventPolling processing item 058c9023-65a2-4828-8575-8c569fc339bd
ReportingServicesService!dbpolling!3!30/10/2014-22:40:22:: i INFO: EventPolling finished processing item 058c9023-65a2-4828-8575-8c569fc339bd
ReportingServicesService!dbcleanup!16!30/10/2014-22:41:58:: e ERROR: Sql Error in CleanExpiredSessions: System.Data.SqlClient.SqlException: Cannot resolve the collation conflict between "Latin1_General_CI_AS_KS_WS" and "Latin1_General_CI_AS" in the equal to operation.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery()
   at Microsoft.ReportingServices.Library.DatabaseSessionStorage.CleanExpiredSessions()
ReportingServicesService!library!16!30/10/2014-22:42:41:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 21 snapshots, 78 chunks, 0 running jobs, 0 persisted streams
ReportingServicesService!dbpolling!11!30/10/2014-22:45:07:: i INFO: EventPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!e!30/10/2014-22:45:07:: i INFO: EventPolling processing item 44368d3b-66ac-4799-9c3e-606cb7cb637c

October 31st, 2014 4:29pm

Hi xXShanXx,

According to the logs information you have provided, the error can be caused by the second reason which I have provided last time: the event processing threads are all tied and not processing the events as fast as they arrive. when a lot of subscriptions are set to fire at the same time, and they may take a long time to complete, so the subscription processing cannot keep up and falls behind, finally timeout.

Could you please look at the RSReportServer.config file and check the report execution time-out. The RSReportServer.config is located at:
<disk drive>:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer.config.

The report server evaluates running jobs at 60 second intervals. At each 60 second interval, the report server compares actual process time against the report execution time-out value. If the processing time for a report exceeds the report execution time-out value, report processing will stop. You can set the RunningRequestsDbCycle setting in the RSReportServer.config file to change the frequency of how often running jobs are evaluated:
<Add Key="RunningRequestsDbCycle" Value="60"/>

By the way, you can also specify a query time-out value for data-driven subscriptions. The query time-out value is specified in the Data-Driven Subscription pages. The value you specify determines how long the report server waits for query processing to complete when retrieving data from the subscriber data source:

For more details about it, please refer to the following article:
Setting Time-out Values for Report Processing:
http://msdn.microsoft.com/en-us/library/ms155782(v=SQL.100).aspx
RSReportServer Configuration File:
http://msdn.microsoft.com/en-us/library/ms157273.aspx
Similar Thread for your reference:
SSRS 2008 Data Driven Subscription Timeout Error

If you still have any question, please feel free to ask.

Regards
Vicky Liu

Free Windows Admin Tool Kit Click here and download it now
November 3rd, 2014 5:40am

Hi Vicky Liu

Thanks a lot , you are great however a small doubt

The RunningRequestsDbCycle setting in the RSReportServer.config file is set to  60 sec.

The Reporting Server Propertiers , under Execution it has the Limit report execution to the following no of seconds set to : 1800

SCREENSHOT below:

Then on the Report Property tab , the Execution is set to use system default setting which would be 1800 sec in this case.

SCREENSHOT below:

Hence 30 min is ample amount of time for the report to get generated.

I have a settings on the data driven subscription settings where, I set the specify a time-out for this command  as 30 sec.

SCREENSHOT below:


The report takes the following parameters: day_id
Specify a time-out for this command: <input class="msrs-txtBox" id="ui_txtDDTimeout" name="ui_txtDDTimeout" style="width:5ex;" value="30" /> seconds







So do does the RunningRequestsDbCycle (60sec ) is compares the actual running against this 30 sec ? or the 1800 sec setting of reporting server. ?

Bcos this report is quite small and not a big one.

Kindly advice.

Thanks a lot .




  • Edited by xXShanXx Monday, November 03, 2014 3:09 PM
November 3rd, 2014 3:07pm

Hi xXShanXx,

According to your description that you are confused about the relationship between setting the RunningRequestsDbCycle, specify a query time-out value  and  setting  the report execution time-out value, right?

RunningRequestsDbCycle:
frequency of how often running jobs are evaluated.
Specifies how often the report server evaluates running jobs to check whether they have exceeded report execution time outs, and when to present running job information in the Manage Jobs page of Report Manager. This value is specified in seconds. Valid values range from 0 to 2147483647. The default is 60.

specify a query time-out value:A query time-out value is the number of seconds that the report server waits for a response from the database. The value you specify determines how long the report server waits for query processing to complete when retrieving data from the subscriber data source. By default, this value is set to 30 seconds

report execution time-out:
A report execution time-out value is the maximum number of seconds that report processing can continue before it is stopped. This value is defined at the system level. You can vary this setting for individual reports.You can set the report execution time-out value to limit the amount of time that a report server uses to process a report. Report execution time-out values can be specified in Report Manager. You can set a default value for all reports in the Site Settings page, and then override that value in the Execution properties page for a specific report. By default, the value is set to 1800 seconds.

How report execution time-out values are evaluated
The report server evaluates running jobs at 60 second(RunningRequestsDbCycle) intervals. At each 60 second interval, the report server compares actual process time against the report execution time-out value(1800s). If the processing time for a report exceeds the report execution time-out value, report processing will stop.

Most time-out errors occur during query processing. If you are encountering time-out errors, try increasing the query time-out value. Make sure to adjust the report execution time-out value so that it is larger than the query time-out. The time period should be sufficient to complete both query and report processing.

Please also check  if you have several instances of the event were running at the same time occupying all of the threads. when a lot of subscriptions are set to fire at the same time, and they may take a long time to complete, so the subscription processing cannot keep up and falls behind. In this case, you may encouraged to run them at different times if possible, or you could consider adding a second reporting server configured as a two node NLB cluster with the other. In this case, both servers will be polling the events table in the RS catalog and processing the events in parallel.

If you still have any question, please feel free to ask.

Regards
Vicky Liu

Free Windows Admin Tool Kit Click here and download it now
November 4th, 2014 6:25am

Thanks a lot Vicky Liu - much appreciated

November 5th, 2014 4:04pm

Hello,

I'm encountering something similar but with a SQL Server Agent Job which intermittently decides NOT to run on some Sundays at its daily time at 10:15am 

This isn't a report, nor a subscription but the issue is quite similar 

We have scheduled job running a console application daily. For some reason on Sunday's only the scheduler says it ran successfully but no email confirmation, table entries and the normal processing occurs. 

This happens only on a Sunday and for no explained reason. No problem on the day before or after... 

I think this also happened with Daylight Savings adjustment. Has anyone else encountered this? 

Any ideas or suggestions 

Environment is: 

Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)   Jun 28 2012 08:36:30   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor) 

Thanks in advance 


George 

Free Windows Admin Tool Kit Click here and download it now
March 10th, 2015 6:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics