JavaSDK-常见问题

1. Timeout waiting for connection from pool

报错:

  1. com.aliyun.opensearch.sdk.dependencies.org.apache.http.conn.ConnectionPoolTimeoutException:
  2. Timeout waiting for connection from pool

说明:Opensearch Java SDK连接池默认大小为50。

可以通过以下方式适当调整连接池大小:

  1. import com.aliyun.opensearch.util.HttpClientManager;
  2. // ...
  3. HttpClientManager.setMaxConnections(100);