You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by tomaswahlgren <to...@gmail.com> on 2015/11/23 15:18:59 UTC

Settings for threads per endpoint

I can't get more than 64 simultaneous calls per endpoint, regardless of what
I set the threads value to. Is there another parameter, or is 64 a hard
limit?

It keeps working when I use more clients, but I cant use more parallell
calls, i.e. a client have to wait until there is a free thread.

My RouteBuilder:

    /public void configure() {
            ...
           
from("jetty:http://0.0.0.0:7076...").routeId(MDP_ROUTE).threads(150, 150,    
"mdpEndpointThread").loadBalance(router).to(<URL1><URL2>);
    }/

Camel version 2.16
Consumer:
jetty:http:0.0.0.0:7076/mdr/api/ifmdr?matchOnUriPrefix=true&amp;enableMultipa‌rtFilter=false 
Producer:
jetty:http:localhost:6080/say/hello1?bridgeEndpoint=true&amp;throwExceptionOn‌Failure=false&amp;disableStreamCache=true






--
View this message in context: http://camel.465427.n5.nabble.com/Settings-for-threads-per-endpoint-tp5774319.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Settings for threads per endpoint

Posted by tomaswahlgren <to...@gmail.com>.
In the end I got around this by using http4 component instead of jetty, and
the component settings
 "setConnectionsPerRoute" and "setMaxTotalConnections" combined with the
"threads" setting on the route.

This seems to give me the unlimited number of parallell sessions that I was
after.



--
View this message in context: http://camel.465427.n5.nabble.com/Settings-for-threads-per-endpoint-tp5774319p5774378.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Settings for threads per endpoint

Posted by tomaswahlgren <to...@gmail.com>.
That actually seems to get me to the same place. I can control Max number of
threads up to 64 per Producer, but never above that. Have even tried
implenting my own thread pool, but same result. The setting works, I can see
that, but only up to 64. 
Btw, multiple producers give me 64 * <number of producers>

Any other config you can think of?



--
View this message in context: http://camel.465427.n5.nabble.com/Settings-for-threads-per-endpoint-tp5774319p5774347.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Settings for threads per endpoint

Posted by Claus Ibsen <cl...@gmail.com>.
You likely need to configure the jetty server thread pool. That is the
thread pool that matters the most as it has the worker threads that
Camel uses when routing from jetty -> to jetty

On Tue, Nov 24, 2015 at 9:37 AM, tomaswahlgren <to...@gmail.com> wrote:
> Thanks for the prompt reply Claus, appriciate it!
>
> I tried setting the httpClientMaxThreads and httpClientMinThreads on the
> "to" component, but couldn't get it to work, still stuck at 64 threads. I
> Removed the "threads" setting in the route. What am not doing right?
>
> /jetty:http://localhost:6080/say/hello1?bridgeEndpoint=true&amp;throwExceptionOnFailure=false&amp;disableStreamCache=true&amp;httpClientMinThreads=150&amp;httpClientMaxThreads=190/
>
> / Tomas
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Settings-for-threads-per-endpoint-tp5774319p5774340.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Settings for threads per endpoint

Posted by tomaswahlgren <to...@gmail.com>.
Thanks for the prompt reply Claus, appriciate it!

I tried setting the httpClientMaxThreads and httpClientMinThreads on the
"to" component, but couldn't get it to work, still stuck at 64 threads. I
Removed the "threads" setting in the route. What am not doing right?

/jetty:http://localhost:6080/say/hello1?bridgeEndpoint=true&amp;throwExceptionOnFailure=false&amp;disableStreamCache=true&amp;httpClientMinThreads=150&amp;httpClientMaxThreads=190/

/ Tomas



--
View this message in context: http://camel.465427.n5.nabble.com/Settings-for-threads-per-endpoint-tp5774319p5774340.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Settings for threads per endpoint

Posted by Claus Ibsen <cl...@gmail.com>.
Configure the thread pool on jetty and then you do not need that extra
threads in the Camel route. Then you leverage the existing thread
pools from jetty. That is the better way.

You can configure thread pool size of jetty on the component level
http://camel.apache.org/jetty

On Mon, Nov 23, 2015 at 3:18 PM, tomaswahlgren <to...@gmail.com> wrote:
> I can't get more than 64 simultaneous calls per endpoint, regardless of what
> I set the threads value to. Is there another parameter, or is 64 a hard
> limit?
>
> It keeps working when I use more clients, but I cant use more parallell
> calls, i.e. a client have to wait until there is a free thread.
>
> My RouteBuilder:
>
>     /public void configure() {
>             ...
>
> from("jetty:http://0.0.0.0:7076...").routeId(MDP_ROUTE).threads(150, 150,
> "mdpEndpointThread").loadBalance(router).to(<URL1><URL2>);
>     }/
>
> Camel version 2.16
> Consumer:
> jetty:http:0.0.0.0:7076/mdr/api/ifmdr?matchOnUriPrefix=true&amp;enableMultipa‌rtFilter=false
> Producer:
> jetty:http:localhost:6080/say/hello1?bridgeEndpoint=true&amp;throwExceptionOn‌Failure=false&amp;disableStreamCache=true
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Settings-for-threads-per-endpoint-tp5774319.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2