Undertow java.nio.BufferOverflowException - buffer-pool configuration?
darrenjones Apr 15, 2014 9:16 AMI'm getting a BufferOverflowException for a certain request (full stack trace below) in WildFly 8.0.0.Final. It looks like I can change the buffer-cache configuration in the io subsytem, but I'm having trouble finding any advice on what to set it to. Can anyone help?
Here's what I have (the defaults, I think).
<buffer-pool name="default" buffer-size="16384" buffers-per-slice="128"/>
Do I need to increase the buffer-size? Is this buffer allocated per request, or is this single buffer used by multiple concurrent requests? On Linux I've found a suggestion that it should be 16384, but what about Windows?
Or is it more appropriate to increase buffers-per-slice? Is buffers-per-slice at all related to the number of concurrent requests I expect to receive?
Thanks.
The exception:
17:29:35,460 ERROR [io.undertow.request] (default task-108) Blocking request failed HttpServerExchange{ GET /MyApp/exception}: java.nio.BufferOverflowException
at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:357) [rt.jar:1.7.0_25]
at java.nio.ByteBuffer.put(ByteBuffer.java:832) [rt.jar:1.7.0_25]
at io.undertow.util.HttpString.appendTo(HttpString.java:204)
at io.undertow.server.protocol.http.HttpResponseConduit.processWrite(HttpResponseConduit.java:149)
at io.undertow.server.protocol.http.HttpResponseConduit.flush(HttpResponseConduit.java:627)
at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.flush(AbstractFixedLengthStreamSinkConduit.java:181)
at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162) [xnio-api-3.2.1.Final.jar:3.2.1.Final]
at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:100)
at io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1477)
at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1465)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:183)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]