Unified Operations & Dynamics AX Forum

Expand all | Collapse all

Error: An existing connection was forcibly closed by the remote host

  • 1.  Error: An existing connection was forcibly closed by the remote host

    GOLD CONTRIBUTOR
    Posted 11-15-2018 10:35 AM
    ​Our AP users are receiving this error when processing EFT payments to vendors.  We believe it might be a report timeout issue because it comes up after about 10 minutes.
              Error msg during EFT payment processing
    They do not receive this error on smaller payment batches.  I suggested that they make several smaller batches, but they would rather not do that because it creates a lot more manual work in order to pick and choose which transactions go into each batch.

    Does anyone know the SSRS report and associated class(es) that would be involved with this process?  I'm having difficulty determining these objects.

    Also, we've had trouble increasing the timeout parameter of SSRS reports, whether we try it on individual reports on the report server, or through SQL Server.  No matter where we try to make the change, it has no effect, even after restarting the AOSs and report server, and the reports still timeout after about 10 minutes even though we specified 60 minutes for the timeout parameter.  What is the trick for making this change "stick"?

    ------------------------------
    Rudy Salcedo
    Senior Programmer/Analyst
    LaForce, Inc
    Green Bay WI
    ------------------------------


  • 2.  RE: Error: An existing connection was forcibly closed by the remote host

    TOP CONTRIBUTOR
    Posted 30 days ago
    ​I have encountered this issue in the past. You do not say but I am guessing this is a customized report. There is a timeout on SQL and a timeout also in the connector with Dynamics , When we encountered it we found that the report actually failed everytime at 5 minutes in. What we found as our issue was that there was a problem with the indexing and the querry that the system was running and it was not taking advantage of the indexes. The query plan was getting into long read loops and that allowed it to time out. We cleared the query plan and fixed the query and then the report ran fine. Also on thing to think about is the number of records you are pulling. If it is too great it can also cause the timeout and for some of those we actually gave them the ability to run the report from SharePoint rather than through Dynamics. Hope this helps, it really took some digging on my teams part to find the issue, maybe able to help you shorten the process.

    ------------------------------
    Paul Martin
    Production Program Manager
    Elite Comfort Solutions, LLC
    Rutherfordton NC
    ------------------------------



  • 3.  RE: Error: An existing connection was forcibly closed by the remote host

    GOLD CONTRIBUTOR
    Posted 30 days ago
    Edited by Rudy Salcedo 30 days ago
    ​Paul, thanks for the info.  The report is actually a standard SSRS report in AX that lists all the payment info for each vendor for EFT payments that are being processed.  I'm not aware that this specific report had to be customized for our purposes.

    You mentioned that you "cleared the query plan and fixed the query".  How exactly did you do that?

    We're thinking that maybe we need to run the process through Trace Parser and SQL Server Database Engine Tuning Advisor to see if we need to create an index or two to speed up the process.

    ------------------------------
    Rudy Salcedo
    Senior Programmer/Analyst
    LaForce, Inc
    Green Bay WI
    ------------------------------



  • 4.  RE: Error: An existing connection was forcibly closed by the remote host

    TOP CONTRIBUTOR
    Posted 26 days ago
    ​we did both, we used trace parcer and SQL to see the query and then when we could see where it was taking so long we used the costing of the query to see where it was taking the most time and then looked at that part of the report and then just chased it down to what the issue really was, we had a great SQL guy on staff and he used SQL to find where the query plan was spending it's time that caused a timeout. I know enough SQL to get by, sorry I can't be more specific on how he did it, but I do know what we did on the end and it fixed our issue.

    ------------------------------
    Paul Martin
    Production Program Manager
    Elite Comfort Solutions, LLC
    Rutherfordton NC
    ------------------------------



  • 5.  RE: Error: An existing connection was forcibly closed by the remote host

    GOLD CONTRIBUTOR
    Posted 18 days ago
    ​I ended up running the process through Trace Parser and SQL Server Database Engine Tuning Advisor, and created several recommended indexes and statistics that were supposed to help improve performance.  Our AP manager received the error again when she ran the process, but this time she got the error after only 3 or 4 minutes.  So we no longer think it's a timing-out issue because the error came up long before the 10-minute mark was reached (our reports time-out after 10 minutes).

    We're not sure what else to try, so right before they run the process again we're going to delete the AP user's .auc files from their C:\Users\userId\AppData\Local\ folders, as well as clear their Class usage data.  We really don't think it will help though because they're able to run the process w/o error on small payment batches.

    Does anyone else have any other suggestions?


    ------------------------------
    Rudy Salcedo
    Senior Programmer/Analyst
    LaForce, Inc
    Green Bay WI
    ------------------------------