D365 Finance & Operations and Dynamics AX Forum

AX2012 R3 SSRS report - connection closed

  • 1.  AX2012 R3 SSRS report - connection closed

    SILVER CONTRIBUTOR
    Posted 19 days ago
    Hi All,
     i have a SSRS report, running from AX 2012 R3, which is receiving error message in Production environment. The error is -
    "An existing connection was forcibly closed by the remote host."
    It happens almost exactly at 5 minutes of execution time. In other environments, it runs successfully, takes about 10-15 mins to finish, depending on data volume.
    -First i tried optimizing the underlying queries, with no significant performance improvement. Same with creating indexes on specific tables.
    -Then, i tried different settings on SSRS report side - increasing timeout and execution time to 30 mins. Still it would error out at 5 min mark.
    -Finally, In production, on both host and SSRS client end, we set the "sendtimeout" and "receivetimeout" to 30 minutes for "QueryServiceBinding".


    However, by default, "MetadataServicebinding" at server end is set as following:

    <binding name="MetadataServiceBinding" sendTimeout="00:05:00" receiveTimeout="00:10:00" maxBufferSize="1048576" maxBufferPoolSize="3145728" maxReceivedMessageSize="1048576" listenBacklog="200" maxConnections="200">

    So we changed the sendTimeOut to 10 mins.

    The report is still failing after 5 mins. The setting s on the other environments, both client, AOS, or Reporting server, are the same, yet the report is coming out fine.
    Any suggestions, where else may i look for the source of an error?

    The captured log from Reporting sever:

    library!ReportServer_0-1!2c0!11/11/2020-01:26:41:: i INFO: RenderForNewSession('/DynamicsAX/AVANIHBBankReconcilationReport.Report')

    processing!ReportServer_0-1!2c0!11/11/2020-01:31:54:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'BankRecon_DS'. ---> System.InvalidOperationException: An exception occurred in the query metadata execution. The exception is The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:30:00'.. ---> Microsoft.Dynamics.AX.Framework.Services.Client.QueryServiceException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:30:00'. ---> System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:30:00'. ---> System.IO.IOException: The read operation failed, see inner exception. ---> System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:30:00'. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

       at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)

       at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)

       --- End of inner exception stack trace ---

       at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)

       at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)

       at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)

       at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count, TimeSpan timeout)

       at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)

       at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)

       at System.Net.Security.NegotiateStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

       at System.Net.Security.NegotiateStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

       at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

       --- End of inner exception stack trace ---





    ------------------------------
    Pedja Nikodijevic
    Express Scripts Canada
    Mississauga
    ------------------------------
    The first step toward cloud success. - Migrate from AX to D365 with expert guidance from Microsoft. I'm Ready


If you've found this thread useful, dive deeper into User Group community content by role