[undertow-dev] Undertow client and ByteBuffer pools

James Netherton jnethert at redhat.com
Tue Nov 17 11:48:22 EST 2015


Hi,

I've been tinkering with the Apache Camel Undertow component. The Camel producer makes use of UndertowClient for HTTP requests. I end up getting OutOfMemoryError exceptions when running the test suite where the producer has been invoked around 25 - 30 times.

I think the way in which the UndertowClient is being configured is sub-optimal. For example, for each producer that's started it creates a (pretty large) ByteBufferSlicePool.

https://github.com/apache/camel/blob/master/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowProducer.java#L130

Which is then used in the client.connect() call whenever the producer runs:

https://github.com/apache/camel/blob/master/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowProducer.java#L80

What's a better, more efficient way of configuring this?

Cheers,

James


More information about the undertow-dev mailing list