Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-28381

Webhook ConnectionPoolTimeoutException: Timeout waiting for connection from pool after sending 20 requests

    XMLWordPrintable

    Details

    • Notability:
      2

      Description

      Issue:

      Webhook functionality fails with below error after sending 20 requests:

      2021-07-15 09:28:33,878+0100 ERROR [webhookService-3-thread-21]  chovivek_adm org.sonatype.nexus.internal.webhooks.WebhookServiceImpl - Failed to send webhook request:WebhookRequest{id='c52f8740-8231-4987-9b7e-551a0e9345bf', webhook=rm:repository:component, payload=org.sonatype.nexus.repository.webhooks.internal.RepositoryComponentWebhook$RepositoryComponentWebhookPayload@5615c5de, url=https://jenkins-oss-ganges.barclays.intranet/generic-webhook-trigger/invoke?token=11328f5b786a81045c2d6f2c92701bc891}
      org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
      at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:316)
      at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:282)
      at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:190)
      at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
      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:83)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
      at org.sonatype.nexus.internal.webhooks.WebhookServiceImpl.send(WebhookServiceImpl.java:201)
      at org.sonatype.nexus.internal.webhooks.WebhookServiceImpl.lambda$0(WebhookServiceImpl.java:161)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      

      The  webhook receiving service receives the requests till Nexus  fails to send any more.

      Steps to reproduce:

      1) In Nexus 3.32.0, setup Webhook repository capability to https://requestcatcher.com/ for assets and components on hosted repo

      2) Upload multiple components to that hosted repo 

      3) After 20 webhook requests, the nexus.log will show "Timeout waiting for connection from pool"

       

      Expected Behaviour:

      The connection should be released after the webhook is sent.

      This is a regression, as the same test works fine in version 3.30.0

        Attachments

          Activity

            People

            Assignee:
            jhill Joshua Hill
            Reporter:
            msurani Mahendra Surani
            Last Updated By:
            Michael Bucher Michael Bucher
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title