org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool

Spring JIRA | Oliver Saggau | 2 years ago
  1. 1

    Timeout waiting for connection from pool - despite single SolrServer

    Stack Overflow | 2 years ago | Schaka
    org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
  2. 0

    By default the HttpSolrServer creates a HttpClient with a PoolingClientConnectionManager with 32 connections per host and 128 total connections. When using MulticoreSolrServerFactory the connManager property is null for the cloned HttpClients and these clients will create a default PoolingClientConnectionManager via createClientConnectionManager() method of the SystemDefaultHttpClient later. So instead of the desired 32/128 connection limit the clients will only have a 2/20 connection limit, which will cause a lot of these exceptions for environments with more than 2 concurrent requests for solr resources: {code}Caused by: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool at org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:232) at org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionManager.java:199) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:455) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:448) ... 149 more{code}

    Spring JIRA | 2 years ago | Oliver Saggau
    org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
  3. 0

    By default the HttpSolrServer creates a HttpClient with a PoolingClientConnectionManager with 32 connections per host and 128 total connections. When using MulticoreSolrServerFactory the connManager property is null for the cloned HttpClients and these clients will create a default PoolingClientConnectionManager via createClientConnectionManager() method of the SystemDefaultHttpClient later. So instead of the desired 32/128 connection limit the clients will only have a 2/20 connection limit, which will cause a lot of these exceptions for environments with more than 2 concurrent requests for solr resources: {code}Caused by: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool at org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:232) at org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionManager.java:199) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:455) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:448) ... 149 more{code}

    Spring JIRA | 2 years ago | Oliver Saggau
    org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    if Nexus cannot allocate internal resources to check if a remote repo is available, then it will autoblock that remote repo, despite the fact that the repo may be online and reachable. Email sent during autoblock: {noformat} Howdy, the proxy mode of repository "Central Proxy" (repoId=central-proxy, remoteUrl=https://secure.central.sonatype.com/maven2/) was set to Blocked (automatically by Nexus). Next attempt to check remote peer health will occur in 2 minutes. The previous state was Blocked (automatically by Nexus). Last detected transport error was: org.sonatype.nexus.proxy.RemoteStorageTransportOverloadedException: Connection pool timeout error while executing GET method [repositoryId="central-proxy", requestPath="/", remoteUrl="https://secure.central.sonatype.com/maven2/?auth=eac0255e7c31bfdc8fb8d5108fa22c0abc887e72182d8b5c0c92c3dbfdfe66dc57fc9dcce5254c1c3338c355fd333d974a85e472f1d6b0bde65362e7163c8186b9d93d21017877e70f0c594eb914b41071e0956ea9b067424ddf"] at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.doExecuteRequest(HttpClientRemoteStorage.java:533) at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.executeRequest(HttpClientRemoteStorage.java:449) at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.executeRequestAndRelease(HttpClientRemoteStorage.java:560) at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.checkRemoteAvailability(HttpClientRemoteStorage.java:358) at org.sonatype.nexus.proxy.storage.remote.AbstractHTTPRemoteRepositoryStorage.isReachable(AbstractHTTPRemoteRepositoryStorage.java:58) at org.sonatype.nexus.proxy.repository.AbstractProxyRepository.isRemoteStorageReachable(AbstractProxyRepository.java:1808) at org.sonatype.nexus.proxy.repository.AbstractProxyRepository$RemoteStatusUpdateCallable.call(AbstractProxyRepository.java:1780) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool at org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:232) at org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionManager.java:199) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:455) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.doExecuteRequest(HttpClientRemoteStorage.java:489) ... 11 more {noformat} Expected: - Nexus to not block a repo unless it can prove it cannot be reached due to external reasons only. ---- Later checking by Nexus, exposes log messages which are not helpful as to why central-proxy remains autoblocked - {noformat} 2013-01-02 02:39:40 INFO [r-central-proxy] - org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry-central-proxy - Next attempt to auto-unblock the "Central Proxy" (id=central-proxy) repository by checking its remote peer health will occur in 1 hour 36 minutes. {noformat} Expected: - a clearer reason why central proxy remains blocked - is it due to original reason or something else?

    Sonatype JIRA | 4 years ago | Peter Lynch
    org.sonatype.nexus.proxy.RemoteStorageTransportOverloadedException: Connection pool timeout error while executing GET method [repositoryId="central-proxy", requestPath="/", remoteUrl="https://secure.central.sonatype.com/maven2/?auth=eac0255e7c31bfdc8fb8d5108fa22c0abc887e72182d8b5c0c92c3dbfdfe66dc57fc9dcce5254c1c3338c355fd333d974a85e472f1d6b0bde65362e7163c8186b9d93d21017877e70f0c594eb914b41071e0956ea9b067424ddf"]
  6. 0

    error person with allocine

    GitHub | 2 years ago | jluc2808
    org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.http.conn.ConnectionPoolTimeoutException

      Timeout waiting for connection from pool

      at org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection()
    2. Apache HttpClient
      AbstractHttpClient.execute
      1. org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:232)
      2. org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionManager.java:199)
      3. org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:455)
      4. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
      5. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
      6. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
      6 frames
    3. Apache Solr Solrj
      HttpSolrServer.executeMethod
      1. org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:448)
      1 frame