配置: WSO2ESB 4.8.0 \ 4.8.1 操作系统:Linux \ FreeBSD
CLIENT <-> ESB <-> BACKEND
这是我的问题:
如果我为样本服务创建最简单的传递代理,其响应延迟为> 60 sec
。当esb关闭与客户端的连接而没有任何响应时,我收到错误。顺便说一句,根据soap tracer日志,ESB从后端接收数据,但此时连接"CLIENT <-> ESB"
已经关闭。
我试图设置这些值:
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>
库/ CONF / nhttp.properties
http.socket.timeout=600000
库/ 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>
库/ 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
库/ 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/).*
没有运气。
测试后端网址:http://rzrbld.ru/timeout/index.php(70秒超时硬编码)
答案 0 :(得分:3)
由于您使用nhttp作为传输,因此在nhttp.properties中添加[1]和[2]
[1]和[2]将帮助您在服务器端和客户端单独定义超时
[1] http.socket.timeout.receiver =监听器的套接字超时 [2] http.socket.timeout.sender =发件人的套接字超时
实施例 [1] http.socket.timeout.receiver = 120000 [2] http.socket.timeout.sender = 120000
答案 1 :(得分:0)
增加nhttp.properties中的http.socket.timeout将无济于事,因为ESB-4.8.X默认使用passthru传输。请将http.socket.timeout = 600000添加到ESB_HOME / repository / conf / passthru-http.properties文件并重新启动服务器。
谢谢! Charitha
答案 2 :(得分:0)
Pass Through代理使用具有默认配置的匿名端点,您应该尝试添加和使用可以配置超时的命名端点。
另一种解决方案是使用标题“To”并发送调解员。在这种情况下,应考虑使用http.socket.timout配置的超时:
<header name="To" value="http://host:port/xxx"/>
<send/>