简体   繁体   English

REST API 在处理超过 3600 秒后未返回答案

[英]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.经过多次分析,我们发现只有满足一个条件才会出现这个错误:API中的处理时间大于3600秒。

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. SAP 通过 Windows Server 2016 和 IIS 10.0 连接到服务器,我们有一个 API 负责与外部系统使用的数据库交互。

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.我们执行的进程将数据从 SAP 发送到 API,然后它使用从 SAP 接收的数据和从外部系统的 DB 获得的数据,在 DB 中执行处理和后续更新。

This process finishes without problems when the processing time in the API is less than 3600 seconds.当 API 中的处理时间小于 3600 秒时,此过程将顺利完成。

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.另一方面,当处理时间大于 3600 秒时,API 正确生成响应,服务器尝试将响应返回给 SAP,但不可行。

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.下面我展示了一个服务器日志条目的示例,它在 API 处理超过 3600 秒后尝试返回响应。 As you can see, a 995 error occurs: (I have censored some parts)如您所见,出现 995 错误:(我已经审查了一些部分)

在服务器日志中检测到错误

Any idea where the error could come from?知道错误可能来自哪里吗?

We have compared IIS configurations in Production and Test.我们在生产和测试中比较了 IIS 配置。 We have also reviewed the parameters of the SAP system in Production and Test and we have not found anything either.我们还在生产和测试中查看了 SAP 系统的参数,我们也没有发现任何东西。

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更新 1 - 2022 年 2 月 9 日

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:在 IIS 上为 200 个响应代码启用 FRT(失败的请求跟踪)后,查看导致错误的请求的事件日志,我们在最后看到了这个事件:

启用 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)" ErrorCode="由于线程退出或应用程序请求,I/O 操作已中止。(0x800703e3)"

UPDATE 2 - 02/09/2022 Comparing configurations from customer's environment and our test environment:更新 2 - 02/09/2022比较来自客户环境和我们的测试环境的配置:

来自客户环境和我们的测试环境的配置

There is a Firewall between SAP Server and IIS Server with the default idle timeout configured for TCP (3600 seconds). SAP 服务器和 IIS 服务器之间存在防火墙,默认空闲超时为 TCP(3600 秒)配置。 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.建立防火墙策略,指定此服务的自定义空闲超时(7200 秒),问题将得到解决。

sc-win32 status 995, the I/O operation has been aborted because of either a thread exit or an application request. sc-win32 状态 995,由于线程退出或应用程序请求,I/O 操作已中止。

Please check the setting of minBytesPerSecond configuration parameter in IIS.请检查 IIS 中minBytesPerSecond配置参数的设置。 The default "minBytesPerSecond" is 240.默认的“minBytesPerSecond”为 240。

Specifies the minimum throughput rate, in bytes, that HTTP.sys enforces when it sends a response to the client.指定 HTTP.sys 在向客户端发送响应时强制执行的最小吞吐率(以字节为单位)。 The minBytesPerSecond attribute prevents malicious or malfunctioning software clients from using resources by holding a connection open with minimal data. minBytesPerSecond 属性通过保持以最少数据打开的连接来防止恶意或故障软件客户端使用资源。 If the throughput rate is lower than the minBytesPerSecond setting, the connection is terminated.如果吞吐率低于 minBytesPerSecond 设置,则终止连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么Android REST API调用比Webapp REST API调用消耗更多的数据 - Why does Android REST API calling consume more data than a webapp REST API calling REST API - 如果请求正文包含的信息多于所需信息,我是否应该返回错误? - REST API - Should I return an error if request body has more information than needed? Salesforce REST API查询超过2000 - Salesforce REST API Query More than 2000 雄辩的Javascript listToArray。 当输入数组包含3个以上元素时,为什么我的for循环返回rest [object] - Eloquent Javascript, listToArray. Why does my for loop return rest [object] when input array has more than 3 elements 如何使用WSO2 DSS在REST服务上返回1条以上的记录? - How to return more than 1 record on REST service with WSO2 DSS? 带有REST API的IBM Connections的20多个活动流条目 - More than 20 Activity Stream Entries of IBM Connections with the REST API Keycloak Admin REST API:查询超过 100 个资源对象 - Keycloak Admin REST API: query more than 100 resource objects REST API 带图像处理? - REST API with image processing? 什么时候SOAP比REST更有意义? - When does SOAP make more sense than REST? sequelize rest api 更新布尔值不止一次 - sequelize rest api updating boolean more than one time
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM