Java.lang.IllegalStateException: the request could not be executed; I / O Reactor Status: STOPPED

I have a service that is expected to execute requests in ~ 5 or more requests / min. This service is dependent on Apache AsyncHttpClient. Every few minutes, clients encounter some state that causes java.lang.IllegalStateException: the request could not be completed; I / O Reactor Status: STOPPED . All client requests begin with the same exception message. After restarting the service, this cycle repeats.

It is very difficult to debug this problem, since failure to execute the request unexpectedly does not call the failed () method callback for AsyncResponse.

From what I could assemble, HTTPCORE-370 in HttpCore NIO was fixed, which resolved a similar problem in 4.3.2, I use the following version - General-HttpClient-3.1.jar httpasyncclient-4.1.1.jar httpcore-4.4.4 .jar httpcore-NiO-4.4.4.jar

But seeing this problem. Any help could be helpful.

+6
source share
1 answer

I considered the same exception in my application, and finally found a useful suggestion from this post - http://httpcomponents.10934.n7.nabble.com/IO-reactor-status-STOPPED-td29059.html

You can use the #getAuditLog () method of the I / O reactor to determine exactly what exception caused it to terminate.

If you keep a link to your IManager ConnectionManager, you can call this method to get an idea of ​​the real problem:

http://hc.apache.org/httpcomponents-core-4.4.x/httpcore-nio/apidocs/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#getAuditLog ()

Turns out I was doing something incredibly stupid in my own code. But I could not understand this until I read the audit log.

0
source

All Articles