1.6.1 - java
APM Agent language and version:
My app seems to fall over sometimes with "LocalizedMessage":"Request cannot be executed; I/O reactor status: STOPPED"
I've been digging into it over the last day or so. Under load, my app seems to get into a state where for some reason everything gets ugly. I'm not sure if it's dependency hell, or just something generally not handling life. In this case, the NPE comes from HttpAsyncRequestProducerWrapper.
The weird thing is, the stack trace doesn't report version or anything...
"thrown":{
"commonElementCount":0,
"localizedMessage":"Error during GET https://webservice.apm.com.au/api/property/v2/state/QLD/suburb/Mansfield/streetname/Dirkala/streetnumber/52/valuation?streettype=St&postcode=4122",
"message":"Error during GET https://webservice.apm.com.au/api/property/v2/state/QLD/suburb/Mansfield/streetname/Dirkala/streetnumber/52/valuation?streettype=St&postcode=4122",
"name":"com.pds.common.http.PDSHttpClientException",
"cause":{
"commonElementCount":1,
"name":"java.lang.NullPointerException",
"extendedStackTrace":[
{
"class":"co.elastic.apm.agent.httpclient.HttpAsyncRequestProducerWrapper",
"method":"close",
"file":"HttpAsyncRequestProducerWrapper.java",
"line":117,
"exact":false,
"location":"?",
"version":"?"
},
{
"class":"org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl",
"method":"releaseResources",
"file":"DefaultClientExchangeHandlerImpl.java",
"line":84,
"exact":false,
"location":"httpasyncclient-4.1.1.jar",
"version":"4.1.1"
},
{
"class":"org.apache.http.impl.nio.client.AbstractClientExchangeHandler",
"method":"close",
"file":"AbstractClientExchangeHandler.java",
"line":399,
"exact":false,
"location":"httpasyncclient-4.1.1.jar",
"version":"4.1.1"
},
{
"class":"org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl",
"method":"responseCompleted",
"file":"DefaultClientExchangeHandlerImpl.java",
"line":182,
"exact":false,
"location":"httpasyncclient-4.1.1.jar",
"version":"4.1.1"
},
{
"class":"org.apache.http.nio.protocol.HttpAsyncRequestExecutor",
"method":"processResponse",
"file":"HttpAsyncRequestExecutor.java",
"line":432,
"exact":false,
"location":"httpcore-nio-4.4.4.jar",
"version":"4.4.4"
},
{
"class":"org.apache.http.nio.protocol.HttpAsyncRequestExecutor",
"method":"inputReady",
"file":"HttpAsyncRequestExecutor.java",
"line":325,
"exact":false,
"location":"httpcore-nio-4.4.4.jar",
"version":"4.4.4"
},
{
"class":"org.apache.http.impl.nio.DefaultNHttpClientConnection",
"method":"consumeInput",
"file":"DefaultNHttpClientConnection.java",
"line":267,
"exact":false,
"location":"httpcore-nio-4.4.4.jar",
"version":"4.4.4"
},
{
"class":"org.apache.http.impl.nio.client.InternalIODispatch",
"method":"onInputReady",
"file":"InternalIODispatch.java",
"line":81,
"exact":false,
"location":"httpasyncclient-4.1.1.jar",
"version":"4.1.1"
},
{
"class":"org.apache.http.impl.nio.client.InternalIODispatch",
"method":"onInputReady",
"file":"InternalIODispatch.java",
"line":39,
"exact":false,
"location":"httpasyncclient-4.1.1.jar",
"version":"4.1.1"
},
{
"class":"org.apache.http.impl.nio.reactor.AbstractIODispatch",
"method":"inputReady",
"file":"AbstractIODispatch.java",
"line":123,
"exact":false,
"location":"httpcore-nio-4.4.4.jar",
"version":"4.4.4"
},
{
"class":"org.apache.http.impl.nio.reactor.BaseIOReactor",
"method":"readable",
"file":"BaseIOReactor.java",
"line":164,
"exact":false,
"location":"httpcore-nio-4.4.4.jar",
"version":"4.4.4"
},
{
"class":"org.apache.http.impl.nio.reactor.AbstractIOReactor",
"method":"processEvent",
"file":"AbstractIOReactor.java",
"line":339,
"exact":false,
"location":"httpcore-nio-4.4.4.jar",
"version":"4.4.4"
},
{
"class":"org.apache.http.impl.nio.reactor.AbstractIOReactor",
"method":"processEvents",
"file":"AbstractIOReactor.java",
"line":317,
"exact":false,
"location":"httpcore-nio-4.4.4.jar",
"version":"4.4.4"
},
{
"class":"org.apache.http.impl.nio.reactor.AbstractIOReactor",
"method":"execute",
"file":"AbstractIOReactor.java",
"line":278,
"exact":false,
"location":"httpcore-nio-4.4.4.jar",
"version":"4.4.4"
},
]
},
I had a brief look at the code, and it does look like some null checking wouldn't go astray - it does seem to be mostly under load - a single request won't fail, but if i use a tool to generate some load, then this failure may randomly happen - might suggest that some extra checking is warranted in the wrapper?