You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2024/11/11 17:59:00 UTC

[jira] [Commented] (CAMEL-21435) Commons-pool2: When Camel Netty configured with producerPoolMaxTotal=1 and retry, the application hangs

    [ https://issues.apache.org/jira/browse/CAMEL-21435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17897243#comment-17897243 ] 

Claus Ibsen commented on CAMEL-21435:
-------------------------------------

Then its a bad idea to use such low pool, set the value higher

> Commons-pool2: When Camel Netty configured with producerPoolMaxTotal=1 and retry, the application hangs
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-21435
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21435
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty
>            Reporter: Dmitrii Kriukov
>            Priority: Minor
>
> 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)