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

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

I would suggest you try to run with TRACE logging at 
org.apache.camel.component.netty
 
And then capture the logging activity what happens when you have the IO network 
error and how camel-netty is invalidating the pooled object and creating a 
fresh new.
This can maybe give hints if there is something that can be improved when the 
pool size is 1 vs having space in the pool.

> 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
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.9.0
>
>
> 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)

Reply via email to