{"id":7369,"date":"2014-06-07T02:36:57","date_gmt":"2014-06-07T02:36:57","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/data-driven-subscription-times-out-on-connection-collection-of-common-programming-errors\/"},"modified":"2014-06-07T02:36:57","modified_gmt":"2014-06-07T02:36:57","slug":"data-driven-subscription-times-out-on-connection-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/data-driven-subscription-times-out-on-connection-collection-of-common-programming-errors\/","title":{"rendered":"Data Driven Subscription times out on connection-Collection of common programming errors"},"content":{"rendered":"<p>I have a data driven subscription which each time it runs shows a &#8220;pending&#8221; status in the Report Manager. Then after a little bit it errors with<\/p>\n<blockquote>\n<p>Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated.<\/p>\n<\/blockquote>\n<p>I am not doing anything extraordinary here. My sproc for retrieving users only returns 2 records (and executes instantly in Management studio). The data for the report isn&#8217;t anything fancy either. It&#8217;s pulling in about 3 records from 3 data sources &#8211; all very straightforward selects based on the ID passed in through the parameters.<\/p>\n<p>When I set up this report to send in a regular subscription, it works fine. It&#8217;s only when I make it data driven that it times out.<\/p>\n<p>The timeout in my config is set to the default (120 seconds).<\/p>\n<p>Here&#8217;s what the logs are saying.<\/p>\n<pre><code>ReportingServicesService!dbpolling!4!12\/20\/2010-14:52:03:: EventPolling processing item 3c45f091-aab6-4354-bd1e-e5a8a8103391\nReportingServicesService!dbpolling!c!12\/20\/2010-14:52:03:: EventPolling processing 1 more items. 1 Total items in internal queue.\nReportingServicesService!library!4!12\/20\/2010-14:52:03:: Schedule fc2dd7c4-ae29-4e20-a24f-e6d7ee04686d executed at 12\/20\/2010 2:52:03 PM.\nReportingServicesService!schedule!4!12\/20\/2010-14:52:03:: Creating Time based subscription notification for subscription: 8a70b89a-bcea-403a-a200-ed0b6e4bc4ab\nReportingServicesService!library!4!12\/20\/2010-14:52:03:: Schedule fc2dd7c4-ae29-4e20-a24f-e6d7ee04686d execution completed at 12\/20\/2010 2:52:03 PM.\nReportingServicesService!dbpolling!4!12\/20\/2010-14:52:03:: EventPolling finished processing item 3c45f091-aab6-4354-bd1e-e5a8a8103391\nReportingServicesService!dbpolling!4!12\/20\/2010-14:52:03:: EventPolling processing item 63c3c8af-b3e5-4822-bb17-73f5f1b9fecc\nReportingServicesService!dbpolling!c!12\/20\/2010-14:52:03:: EventPolling processing 1 more items. 1 Total items in internal queue.\nReportingServicesService!dbpolling!4!12\/20\/2010-14:52:03:: EventPolling finished processing item 63c3c8af-b3e5-4822-bb17-73f5f1b9fecc\nReportingServicesService!library!d!12\/20\/2010-14:52:33:: e ERROR: Error processing data driven subscription: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.\nThe statement has been terminated.\n   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)\n   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)\n   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()\n   at System.Data.SqlClient.SqlDataReader.get_MetaData()\n   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)\n   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)\n   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)\n   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)\n   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)\n   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)\n   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)\n   at Microsoft.ReportingServices.DataExtensions.SqlCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)\n   at Microsoft.ReportingServices.Library.DataDrivenSubscriptionHandler.DataDrivenSubscriptionWorker(Object o)\n<\/code><\/pre>\n<p>I tried making a new data source using the local administrator account (who is also the sa) and I still get the timeout. This report is nothing special. It&#8217;s actually just formatted text with little pieces of data. I&#8217;m using SSRS to handle sending formatted e-mails. The only concern I do have is that the machine running SSRS only has 2.0 GB ram. Could that be causing the timeout? But then why is it that when I execute the report for one user, it&#8217;s fine, but for 2 users it goes kablooey?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a data driven subscription which each time it runs shows a &#8220;pending&#8221; status in the Report Manager. Then after a little bit it errors with Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated. I am not doing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7369","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7369"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7369\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}