resthttpiissapwindows-server

REST API does not return answer back after more than 3600 seconds of processing


We have spent several weeks trying to fix an issue that occurs in the customer's production environment and does not occur in our test environment.

After several analyses, we have found that this error occurs only when one condition is met: processing times greater than 3600 seconds in the API.

The situation is the following:

SAP is connected to a server with Windows Server 2016 and IIS 10.0 where we have an API that is responsible for interacting with a DB use by an external system.

The process that we execute sends data from SAP to the API and this, with the data it receives from SAP and the data it obtains from the DB of the external system, performs a processing and a subsequent update in the DB.

This process finishes without problems when the processing time in the API is less than 3600 seconds.

On the other hand, when the processing time is greater than 3600 seconds, the API generates the response correctly, and the server tries to return the response to SAP, but it is not possible.

Below I show an example of a server log entry when it tries to return a response after more than 3600 seconds of API processing. As you can see, a 995 error occurs: (I have censored some parts)

Error detected in the server log

Any idea where the error could come from?

We have compared IIS configurations in Production and Test. We have also reviewed the parameters of the SAP system in Production and Test and we have not found anything either.

I remain at your disposal to provide any type of additional information that may be useful for solving the problem.


UPDATE 1 - 02/09/2022

After enabling FRT (Failed Request Tracing) on IIS for 200 response codes, looking at the event log of the request that is causing the error, we have seen this event at the end:

Error detected after enabling FRT

Any information about what could be causing this error? ErrorCode="The I/O operation has been aborted because of either a thread exit or an application request. (0x800703e3)"

UPDATE 2 - 02/09/2022 Comparing configurations from customer's environment and our test environment:

Configurations from customer's environment and our test environment


Solution

  • There is a Firewall between SAP Server and IIS Server with the default idle timeout configured for TCP (3600 seconds). This is not happening in Test Environment because there is no Firewall.

    Establishing a Firewall policy specifying a custom idle timeout for this service (7200 seconds) the problem will be solved.