Connection pool shut down
请求过多的时候,会出现以下错误 org.frameworkset.elasticsearch.ElasticSearchException: java.lang.IllegalStateException: Connection pool shut down Caused by: java.lang.IllegalStateException: Connection pool shut down at org.apache.http.util.Asserts.check(Asserts.java:34) at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:191) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.requestConnection(PoolingHttpClientConnectionManager.java:267) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:176) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:221) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140) at org.frameworkset.spi.remote.http.HttpRequestUtil.sendBody(HttpRequestUtil.java:1285) at org.frameworkset.spi.remote.http.HttpRequestUtil.sendJsonBody(HttpRequestUtil.java:1264)Disconnected from the target VM, address: '127.0.0.1:49503', transport: 'socket'
at org.frameworkset.elasticsearch.client.RestSearchExecutorUtil.__executeHttp(RestSearchExecutorUtil.java:67)
at org.frameworkset.elasticsearch.client.RestSearchExecutor.executeHttp(RestSearchExecutor.java:115)
at org.frameworkset.elasticsearch.client.ElasticSearchRestClient$3.execute(ElasticSearchRestClient.java:771)
at org.frameworkset.elasticsearch.client.ElasticSearchRestClient._executeHttp(ElasticSearchRestClient.java:940)
... 61 more
@lvxincao
是不是基于容器环境,如果是的话,估计是因负载过高,进程自动重启或者重新部署导致,
在重启过程中bboss使用的连接池会自动释放关闭,但是进程还在接收请求,这个时候请求无法处理,从而报错
最好的办法是进程进程重启过程时,不要再接收请求!
@lvxincao 建议升级到bboss最新版本: https://esdoc.bbossgroups.com/#/changelog
你好,我们使用的6.2.9版本,也是出现了这个错误,我们是裸机部署,不是容器环境,没有自动重启情况。跑了一天大概出现了2000多次这个错误,从早晨到晚上不间断出现,关键是还有请求成功的。按理说如果状态不对,所有的请求不应该都失败吗,为什么还大部分会请求成功,只有个别请求失败的呢。