Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection pool shut down #51

Open
lvxincao opened this issue Feb 21, 2022 · 2 comments
Open

Connection pool shut down #51

lvxincao opened this issue Feb 21, 2022 · 2 comments

Comments

@lvxincao
Copy link

请求过多的时候,会出现以下错误
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
@yin-bp
Copy link
Contributor

yin-bp commented Feb 21, 2022

@lvxincao

是不是基于容器环境,如果是的话,估计是因负载过高,进程自动重启或者重新部署导致,

在重启过程中bboss使用的连接池会自动释放关闭,但是进程还在接收请求,这个时候请求无法处理,从而报错

最好的办法是进程进程重启过程时,不要再接收请求!

@yin-bp
Copy link
Contributor

yin-bp commented Nov 5, 2023

@lvxincao 建议升级到bboss最新版本:
https://esdoc.bbossgroups.com/#/changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants