consul-api icon indicating copy to clipboard operation
consul-api copied to clipboard

consulRawClient ```java.lang.IllegalStateException: Connection pool shut down```

Open FangXiaoMing2021 opened this issue 4 years ago • 2 comments

I encountered this error using the consul client, I don’t know how it happened, can anyone help?

java.lang.IllegalStateException: Connection pool shut down

FangXiaoMing2021 avatar Oct 27 '21 12:10 FangXiaoMing2021

consul-api version 1.4.1
httpclient version 4.5.10
httpcore version 4.4.11

FangXiaoMing2021 avatar Oct 27 '21 12:10 FangXiaoMing2021

i got same exception, it seems to be caused by httpcomponents. in httpcomponents 4.5.x, developer push this code #https://github.com/apache/httpcomponents-client/commit/ca98ad69adad79de57d8b944ba524f7267a795cb,

        } catch (final RuntimeException ex) {
            releaseTrigger.abortConnection();
            throw ex;
        } catch (final Error error) {
            connManager.shutdown();
            throw error;
        }
    }

if your app throw StackOverflowErroror OutOfMemoryError or else Error, may be catched by this code,then connection pool shutdown.

Kunple-w avatar Feb 06 '23 13:02 Kunple-w