function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mitch McConnellMitch McConnell 

SOA CalloutException question

Hello all,

I have a batch job using SOA that calls out to an internal (in-house) application.  It has been working
for quite a long time, but recently we started seeing some batches (not all) get a System.CalloutException
as follows:

06:06:00.443 (14443246995)|EXCEPTION_THROWN|[107]|System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: [WliSbTransports:381304]Exception in HttpOutboundMessageContext.RetrieveHttpResponseWork.run: java.net.SocketTimeoutException
java.net.SocketTimeoutException
    at weblogic.net.http.AsyncResponseHandler$MuxableSocketHTTPAsyncResponse$SocketTimeoutNotification.<clinit>(AsyncResponseHandler.java:551)
    at weblogic.net.http.AsyncResponseHandler$MuxableSocketHTTPAsyncResponse.handleTimeout(AsyncResponseHandler.java:396)
    at weblogic.net.http.AsyncResponseHandler$MuxableSocketHTTPAsyncResponse.timeout(AsyncResponseHandler.java:502)
    at weblogic.socket.SSLFilterImpl.timeout(SSLFilterImpl.java:282)
    at weblogic.socket.SocketMuxer$TimerListenerImpl.timerExpired(SocketMuxer.java:985)
    at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
 faultcode=BEA-380000 faultactor=

Here are the relevant debug log entries:
>>>> this shows the configured (via a custom setting) max timeout of 2 minutes (right?)
06:05:46.0 (197739069)|USER_DEBUG|[252]|DEBUG|(doCallout) endpoint: https://soa-app.tpa.bhn.net:8110/ConstInt/CarlInfo?wsdl, timeout: 120000
>>>> this is the last entry before the synchronous callout
06:05:46.0 (439200493)|CALLOUT_REQUEST|[107]|getCarlInfo:[apex_schema_type_info=(carl.bhntampa.com, false, false), carlIds=307141, 308773, 309197, 308791, 326971, 294926, 316435, 326760, 327228, 314680, 314489, 317260, 299892, 312385, 309598, 301140, 283894, 316860, 327205, 306558, 315239, 187167, 283499, 366190, 314846, 314204, 314218, 298740, 317291, 314966, 367312, 317912, 366192, 366885, 285552, 309794, 313714, 285551, 309799, 285556, 335527, 282875, 367483, 309792, 285555, 367206, 307672, 309793, 313710, 318240, 301444, 310414, 317464, 291091, 305452, 316534, 369654, 317681, 367509, 316826, 363161, 318429, 308501, 315622, 357571, 318474, 318445, 276556, 316827, 367554, 317563, 367617, 367639, 361574, 304283, 367622, 367684, 318688, 367635, 316824, 367620, 305672, 318690, 363247, 316680, 318839, 367338, 318272, 318635, 304198, 318943, 311999, 286633, 313896, 313898, 338556, 316599, 307264, 318066, 326252, 359683, 318040, 318488, 319218, 315600, 319380, 319216, 334011, 318720, 318877, 327051, 318686, 314722, 274227, 316562, 318408, 319368, 315057, 319425, 316158, 290370, 318412, 310072, 313894, 309139, 343561, 318838, 380595, 319627, 313901, 313893, 313897, 327385, 313892, 305756, 311043, 315546, 298078, 327341, 294253, 319733, 318522, 314642, 318990, 274475, 307625, 294247, 294662, 282970, 294242, 294249, 314551, 288192, 275062, 318989, 319863, 311041, 318991, 300342, 319962, 319864, 318911, 319822, 318144, 33333, 362321, 358863, 320091, 298431, 321948, 320118, 351615, 359145, 317533, 327439, 362110, 321945, 316868, 360864, 364416, 321947, 327486, 373387, 327507, 319135, 286913, 319805, 339553, 320244, 317938, 318977, 368429, 368203, 364806, 313374, 318067, 327363, 320301, 319945, carlIds_type_info=(carlIds, carl.bhntampa.com, null, 1, 1, false), field_order_type_info=(carlIds)]::SOAPAction="" Accept=text/xml User-Agent=SFDC-Callout/36.0 SFDC_STACK_DEPTH=1 Content-Type=text/xml; charset=UTF-8 

>>>> here is the next entry, which occurs not 2 minutes later, but about 14 seconds later
06:06:00.443 (14443246995)|EXCEPTION_THROWN|[107]|System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: [WliSbTransports:381304]Exception in HttpOutboundMessageContext.RetrieveHttpResponseWork.run: java.net.SocketTimeoutException

What am I missing here?   I started with the assumption that the server I am calling is not keeping up, and that that is the reason for the timeout.  But the developer tells me he sees these being responded to in at most 10-12 seconds... s

So my real question is:
1.  Is it possible that something in our SOA middleware is throwing this exception, and not Salesforce?

Thanks,

Mitch
 

Best Answer chosen by Mitch McConnell
sumit singh 37sumit singh 37
This is a time out exception , nothing much can be done , becz the incoming response takes more then 2 min , use try catch to avoid the exception.
 

All Answers

pconpcon
This looks like the middleware is not returning anything back to Salesforce to tell them that the transaction is complete.  So, Salesforce is sitting with an open connection until the 2 minute window is up then throwing the exception.  Are you able to make the same callout via the Devloper Console with a small (1 or 2 id) subset of your data and verify that the endpoint is responding correctly?  If it is for a small subset, it may be that a larger data set is causing this issue.

The key takeaway is that this error is most likely caused by your middleware and not Salesforce.
sumit singh 37sumit singh 37
This is a time out exception , nothing much can be done , becz the incoming response takes more then 2 min , use try catch to avoid the exception.
 
This was selected as the best answer