WSO2 MI 4.0.0 如何增加超时?报101505错误

发布于 2025-01-16 05:58:33 字数 2944 浏览 3 评论 0 原文

我们正在尝试构建一个应用程序,MI 负责调用服务,然后接收响应并使用该响应执行 CRUD。但服务时间太长,超过5分钟。我正在尝试增加超时时间。我尝试增加这样的标志;

synapse.properties:passthru-http.properties

socket_timeout = 720000 // did not work
connection_timeout = 720000 // did not work
io_buffer_size = 65536 // may be response size affect did not work

synapse.global_timeout_interval = 720000 // did not work

端点xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <endpoint name="ISScraper" xmlns="http://ws.apache.org/ns/synapse">
        <address uri="$SYSTEM:isEndpoint">
            <timeout>
                <duration>600000</duration> // did not work
            </timeout>
            <suspendOnFailure>
                <errorCodes>-1</errorCodes>
                <initialDuration>0</initialDuration>
                <progressionFactor>1.0</progressionFactor>
                <maximumDuration>0</maximumDuration>
            </suspendOnFailure>
            <markForSuspension>
                <errorCodes>-1</errorCodes>
                <retriesBeforeSuspension>0</retriesBeforeSuspension>
            </markForSuspension>
        </address>
    </endpoint>

始终出现101505“连接已关闭”错误,每次调用后5分钟都会给出错误:

[2022-03-22 14:08:23,829]  WARN {TargetHandler} - ERROR_CODE = 101505, STATE_DESCRIPTION = Connection closed by target host after Server written the request headers and the request body to the backend, INTERNAL_STATE = REQUEST_DONE, DIRECTION = REQUEST, CAUSE_OF_ERROR = Connection between the Server and the BackEnd has been closed, TARGET_HOST = 3.134.125.175, TARGET_PORT = 80, TARGET_CONTEXT = http://54ce-94-54-20-33.ngrok.io/credit-cards/start, HTTP_METHOD = POST, TRIGGER_TYPE = api, TRIGGER_NAME = Synchronization, REMOTE_ADDRESS = 54ce-94-54-20-33.ngrok.io/3.134.125.175:80, CONNECTION = http-outgoing-7
Tue Mar 22 14:08:23 GMT 2022 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

输入图像描述这里

此外,我们正在对 MI 项目进行 docker 化。更改了deployment.toml 中的所有标志。然后对每个标志更改进行测试。 由于 101505“连接已关闭”错误,我尝试了;

disable_connection_keepalive = true // did not work
and 
disable_connection_keepalive = false// did not work

我们如何增加超时时间?

We are trying to build an application that MI is responsible for invoking a service then receiving the response and doing CRUD with this response. But the service takes too much time like more than 5 mins. I am trying to increase timeout. I tried to increase flags like these;

synapse.properties:

socket_timeout = 720000 // did not work
connection_timeout = 720000 // did not work
io_buffer_size = 65536 // may be response size affect did not work

passthru-http.properties:

synapse.global_timeout_interval = 720000 // did not work

endpoint xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <endpoint name="ISScraper" xmlns="http://ws.apache.org/ns/synapse">
        <address uri="$SYSTEM:isEndpoint">
            <timeout>
                <duration>600000</duration> // did not work
            </timeout>
            <suspendOnFailure>
                <errorCodes>-1</errorCodes>
                <initialDuration>0</initialDuration>
                <progressionFactor>1.0</progressionFactor>
                <maximumDuration>0</maximumDuration>
            </suspendOnFailure>
            <markForSuspension>
                <errorCodes>-1</errorCodes>
                <retriesBeforeSuspension>0</retriesBeforeSuspension>
            </markForSuspension>
        </address>
    </endpoint>

Always taking the 101505 "Connection closed" error and every time it gives the error 5 mins after the call is made:

[2022-03-22 14:08:23,829]  WARN {TargetHandler} - ERROR_CODE = 101505, STATE_DESCRIPTION = Connection closed by target host after Server written the request headers and the request body to the backend, INTERNAL_STATE = REQUEST_DONE, DIRECTION = REQUEST, CAUSE_OF_ERROR = Connection between the Server and the BackEnd has been closed, TARGET_HOST = 3.134.125.175, TARGET_PORT = 80, TARGET_CONTEXT = http://54ce-94-54-20-33.ngrok.io/credit-cards/start, HTTP_METHOD = POST, TRIGGER_TYPE = api, TRIGGER_NAME = Synchronization, REMOTE_ADDRESS = 54ce-94-54-20-33.ngrok.io/3.134.125.175:80, CONNECTION = http-outgoing-7
Tue Mar 22 14:08:23 GMT 2022 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

enter image description here

Also we are dockerizing the MI project. Changed all flags inside deployment.toml. And then up and tested it for every flag change.
Because of 101505 "Connection closed" error , I tried the ;

disable_connection_keepalive = true // did not work
and 
disable_connection_keepalive = false// did not work

How can we increase timeout?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷你仙 2025-01-23 05:58:33

在deployment.toml文件中添加以下内容

[transport.http]

socket_timeout = 300000

还需要调整超时持续时间。

另外,如果您在阻塞模式下使用呼叫调解器,请将以下内容添加到deployment.toml中

[transport.blocking.http]
sender.so_timeout = 300000

In deployment.toml file add following

[transport.http]

socket_timeout = 300000

Also need to adjust timeout duration As well.

Also if you are using call mediator in blocking mode add the following to the deployment.toml

[transport.blocking.http]
sender.so_timeout = 300000
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文