on 2019 Jul 19 10:57 AM
Hi experts,
I'm using the standard API to export an order to a backend system via SCPI. By standard I mean
Extension: CPI Order Exchange OMS: SapCpiOmsOrderOutboundAction.executeAction()
Extension: CPI Adapter: SapCpiOutboundService.sendOrder()
Extension: Outbound Services: DefaultOutboundServiceFacade.send()
The DefaultOutboundServiceFacade.send() calls internally restTemplate.postForEntity() which throws ResourceAccessException with underlying exception java.net.SocketTimeoutException with message 'Read timed out'. However, the case is that the SCPI sometimes needs a bit more time and in that case I get the exception although SCPI processed everything without any errors.
Is there a way to configure timeout configuration, i.e. to tell Spring to wait a bit more before throwing the exception?
Cheers, Filip
Request clarification before answering.
I found the solution. In short, in local.properties set value outboundservices.httpclient.connections.connectionTimeout=0
to override the default value. 0 means that session never times out, which is probably not what you want for your production.
The default value is 20000 and its set in outboundservices-spring.xml
<alias name="defaultOutboundHttpClientFactory" alias="outboundHttpClientFactory" />
<bean id="defaultOutboundHttpClientFactory" class="de.hybris.platform.outboundservices.client.impl.DefaultOutboundHttpClientFactory">
<property name="maxConnections" value="${outboundservices.httpclient.max.connections:5}" />
<property name="keepAlive" value="${outboundservices.httpclient.connections.keep-alive:60000}" />
<property name="timeout" value="${outboundservices.httpclient.connections.connectionTimeout:20000}" />
<property name="validity" value="${outboundservices.httpclient.connections.validity:500}" />
</bean>
More information at
https://answers.sap.com/questions/12758503/specify-session-timeout.html
&
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.