SQL Server Reporting Services -- Deploying report fails -- The operation has timed out

DJAdan 671 Reputation points
2020-08-18T18:44:10.42+00:00

HI All,

I am getting an error today that I have not received before. When using Visual Studio to deploy a report to my SSRS 2017 Report Server, I am getting the error "The operation has timed out." I am using SSDT and Visual Studio 15.9.18.

When I go to the Report Server, and look in the RSManagement_*.log, I see the following message:

> 2020-08-18 14:30:43.7872|ERROR|18|Unhandled error in the Web API. Exception: System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.IO.IOException ---> System.Net.HttpListenerException: The I/O operation has been aborted because of either a thread exit or an application request

   at System.Net.HttpResponseStream.EndWrite(IAsyncResult asyncResult)
   at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.EndWrite(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.EndWrite(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Owin.HttpMessageHandlerAdapter.<SendResponseContentAsync>d__20.MoveNext()| RequestID = s_0faabcac-b9e1-4221-9401-6c83bc75a6f8 

This problem seems intermittent, but appears to happen on my "larger reports" more frequently.

How do I fix this?

Thank you.

--Dan

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,917 questions
0 comments No comments
{count} votes

Accepted answer
  1. DJAdan 671 Reputation points
    2020-08-21T20:34:13.977+00:00

    Hi Joy,

    I have been thinking about your comment that the problem might by VS related. So, I decided to start from scratch.

    Using Visual Studio, I tried the following steps in order:

    1. Tried to "Deploy" my report -- Failure with "The operation has timed out"
    2. Right-mouse-clicked on the Project Folder, and issued a "Clean"
    3. Right-mouse-clicked on the Project Folder, and issued a "Rebuild"
    4. Right-mouse-clicked on the offending report, and issued a "Deploy" -- SUCCESS!

    Apparently, something in my VS environment became bloated and was blocking successful deployments. I don't know why. But this seems to have solved my problem.

    Thanks again for your help.

    --Dan

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,576 Reputation points
    2020-08-19T02:51:23.85+00:00

    Hi Dan,
    According to your description, when you are deploying large reports, deployment failures will occur, right? You can try the following operation.

    1. Increase the maximum request bytes, add "MaxRequestBytes" as a DWORD value. See Http.sys registry settings for IIS for more information. For MaxRequestLength the default value is 16384 and the max is 16777216 (16 MB).
    2. Find the web.config file in the Reporting Service installation directory (for example: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\ReportServer), and modify the maxRequestLength attribute in <httpRuntime>. Reference: < httpRuntime> Element.
    3. In the web.config file,locate the HttpRuntime parameter. If it doesn’t exist, you will have to create it within the <System.Web> section.
      Set the executionTimeout value to ‘10800’ (3 hours) as shown below:
      <system.web>
      < httpRuntime executionTimeout = "10800" />
      < /system.web>
    4. The last thing to verify was that HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\EnableTCPChimney was already set to 0.

    The server was rebooted for another reason after making the MaxRequestLength registry change and maybe you can upload all reports now, including the larger one, all via HTTPS.

    Hope this help!
    Regards,
    Joy

    0 comments No comments

  2. DJAdan 671 Reputation points
    2020-08-19T15:02:36.35+00:00

    Joy,
    Thank you for responding.

    I will check these settings out and get back to you. It is strange, some reports deploy others time out.

    The error message is not descriptive enough to point to a root cause. In your experience, which setting is the most likely culprit?

    I am reluctant to try all of these options, as in most cases I don't see the values in my config files today, and things have been working until very recently. I must have tripped over a threshold that I don't quite understand.

    Thanks again,

    --Dan

    0 comments No comments

  3. Joyzhao-MSFT 15,576 Reputation points
    2020-08-20T06:11:52.557+00:00

    One additional question, is this repetitive? E.g. if one report has this problem, when you deploy the .rdl by manually upload it in SSRS web port, will the issue repeatedly happen?

    IMHO, I think this could be an issue that's more related to VS or computer device.
    I found this thread is informative, hope you could find some ideal in it for your environment: The I/O operation has been aborted because of either a thread exit or an application request.

    0 comments No comments

  4. DJAdan 671 Reputation points
    2020-08-20T14:34:21.107+00:00

    Hi Joy,

    Interesting observation.

    I was able to work around the Visual Studio deployment error by using Report Manager "Upload" directly from the website. I have not had to deploy that way in the past, but it enabled me to successfully deploy the report.

    I am still getting Time Out errors for the same report when I try it from VS.

    I'll keep you posted.

    Thank you.

    --Dan

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.