wso2 esb 连接超时调整 [英] wso2 esb connection timeout tuning

查看:36
本文介绍了wso2 esb 连接超时调整的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

配置:WSO2ESB 4.8.0\4.8.1操作系统:Linux\FreeBSD

configuration: WSO2ESB 4.8.0\4.8.1 OS: Linux\FreeBSD

CLIENT <-> ESB <-> BACKEND

这是我的问题:如果我为示例服务创建最简单的直通代理,该代理以 > 的延迟响应;60 秒.当 esb 关闭与客户端的连接而没有任何响应时,我收到错误消息.顺便说一下,根据soap tracer日志,ESB从后端接收数据,但是连接"CLIENT <-> ESB"在那个时候已经关闭了.

here is my problem: if i create the simplest pass-through proxy to the sample service which responses with a delay of > 60 sec. i get an error when esb closes connection with the client without any response. By the way, according to the soap tracer logs ESB receives data from the backend, but connection "CLIENT <-> ESB" is already closed at that time.

我尝试设置这些值:

repository/conf/axis2/axis2_client.xml

repository/conf/axis2/axis2_client.xml

    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"
            (...)
            <parameter name="SO_TIMEOUT">120000</parameter>
            <parameter name="CONNECTION_TIMEOUT">120000</parameter>
        </transportSender>
        <transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
            (...)
            <parameter name="SO_TIMEOUT">120000</parameter>
            <parameter name="CONNECTION_TIMEOUT">120000</parameter>
        </transportSender>

repository/conf/nhttp.properties

repository/conf/nhttp.properties

http.socket.timeout=600000

repository/conf/axis2/axis2.xml

repository/conf/axis2/axis2.xml

<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
      (...)
        <parameter name="SO_TIMEOUT" locked="false">120000</parameter>
        <parameter name="CONNECTION_TIMEOUT" locked="false">120000</parameter>
      (...)
    </transportReceiver>


    <transportReceiver name="https" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener">
       (...)
        <parameter name="SO_TIMEOUT" locked="false">120000</parameter>
        <parameter name="CONNECTION_TIMEOUT" locked="false">120000</parameter>
        (...)
     </transportReceiver>


<transportSender name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
        (...)
        <parameter name="SO_TIMEOUT" locked="false">120000</parameter>
        <parameter name="CONNECTION_TIMEOUT" locked="false">120000</parameter>

    </transportSender>
    <transportSender name="https" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSSLSender">
            (...)
            <parameter name="SO_TIMEOUT" locked="false">120000</parameter>
            <parameter name="CONNECTION_TIMEOUT" locked="false">120000</parameter>
</transportSender>

repository/conf/synapse.properties

repository/conf/synapse.properties

synapse.sal.endpoints.sesssion.timeout.default=600000
synapse.global_timeout_interval=600000

#In memory statistics cleaning state 
statistics.clean.enable=false

# Dependency tracking Synapse observer
# Comment out to disable dependency management
synapse.observers=org.wso2.carbon.mediation.dependency.mgt.DependencyTracker

# Uncomment following to support fallback XPATH 2.0 support with DOM and Saxon
#synapse.xpath.dom.failover.enabled=true
synapse.temp_data.chunk.size=3072

# A configuration to add tenant information to the out thread local carbon context
synapse.carbon.ext.tenant.info=org.wso2.carbon.mediation.initializer.handler.CarbonTenantInfoConfigurator

#external component registration for secure vault xpath function lookup
synapse.xpath.func.extensions=org.wso2.carbon.mediation.security.vault.xpath.SecureVaultLookupXPathFunctionProvider

repository/conf/passthru-http.properties

repository/conf/passthru-http.properties

## Pass-through HTTP transport specific tuning parameters
worker_pool_size_core=400
worker_pool_size_max=500
worker_thread_keepalive_sec=600
#worker_pool_queue_length=-1
#io_threads_per_reactor=2
io_buffer_size=16384
#http.max.connection.per.host.port=32767
http.socket.timeout=600000

# This property is crucial for automated tests
http.socket.reuseaddr=true

## Other parameters
#http.user.agent.preserve=false
#http.server.preserve=true
#http.connection.disable.keepalive=false
rest.dispatcher.service=__MultitenantDispatcherService
# URI configurations that determine if it requires custom rest dispatcher
rest_uri_api_regex=\\w+://.+:\\d+/t/.*|\\w+://.+\\w+/t/.*|^(/t/).*
rest_uri_proxy_regex=\\w+://.+:\\d+/services/t/.*|\\w+://.+\\w+/services/t/.*|^(/services/t/).*

没有运气.测试后端 URL:http://rzrbld.ru/timeout/index.php(70 秒超时硬编码)

with no luck. Test backend URL: http://rzrbld.ru/timeout/index.php (70 sec Timeout hardcoded)

推荐答案

由于您使用的是 nhttp 作为传输,因此在 nhttp.properties 中添加 [1] 和 [2]

Since you are using the nhttp as a transport, add [1] and [2] in the nhttp.properties

[1] 和 [2] 将帮助您在服务器端和客户端分别定义超时

[1] and [2] will help you to define the time out separately in the server and client side

[1]http.socket.timeout.receiver = 监听器的套接字超时[2]http.socket.timeout.sender = 发送方的套接字超时

[1]http.socket.timeout.receiver = Socket timeout for Listener [2]http.socket.timeout.sender = Socket timeout for Sender

示例[1] http.socket.timeout.receiver=120000[2] http.socket.timeout.sender=120000

Example [1] http.socket.timeout.receiver=120000 [2] http.socket.timeout.sender=120000

这篇关于wso2 esb 连接超时调整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆