Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-21435

Commons-pool2: When Camel Netty configured with producerPoolMaxTotal=1 and retry, the application hangs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Information Provided
    • None
    • 4.9.0
    • camel-netty
    • None
    • Unknown

    Description

      Retry on the onException() clause seems to be impossible for producerPoolMaxTotal=1 (leads to call of GenericObjectPoolConfig.setMaxTotal())
      This causes infinite hanging in case of network IO exceptions.
      Netty attempts to utilize a new connection when the old one is still unreleased.
      It boils down to method org.apache.commons.pool2.impl.GenericObjectPool::borrowObject(Duration borrowMaxWaitDuration) throws Exception {}
      When producerPoolBlockWhenExhausted = true (the default value), the application hangs.
      When producerPoolBlockWhenExhausted = false, I get an exception 
      2024-11-11 13:41:44 ERROR [com.opt.obp.ser.ada.cam.Logger] (Camel Thread #2 - NettyClientTCPWorker) <> Exception occurred: java.util.NoSuchElementException: Pool exhausted 
      So, either way it's impossible to serve

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            dkryukov Dmitrii Kriukov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: