Siege load test fails due to "unable to determine chunk size"

I’m using the command line load test tool siege to load test my site. When I run the test, it sometimes enters a state where it outputs a continuous stream of alerts:

[alert] HTTP: unable to determine chunk size
[alert] HTTP: unable to determine chunk size
[alert] HTTP: unable to determine chunk size
[alert] HTTP: unable to determine chunk size
[alert] HTTP: unable to determine chunk size
[alert] HTTP: unable to determine chunk size

There are hundreds and hundreds of these of these messages filling the entire scroll buffer of my terminal. When this happens the load test seems to pause until I kill it with ^C.

This corresponds to the following exception in my server log files. On the server side, I just get a single (not repeated) error:

java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
    at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240)
    at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84)
    at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192)
    at org.apache.coyote.Response.doWrite(Response.java:499)
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:402)
 [wrapped] ClientAbortException:  java.net.SocketException: Broken pipe
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:407)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:371)
    at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:432)
    at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:420)
    at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
    at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:84)
    at mysite.BinaryDataUriRenderer.render(BinaryDataUriRenderer.java:34)
 [wrapped] java.lang.RuntimeException: ClientAbortException:  java.net.SocketException: Broken pipe
    at mysite.err.ExceptionFactory.runtime(ExceptionFactory.java:30)
    at mysite.staticcontent.BinaryDataUriRenderer.render(BinaryDataUriRenderer.java:37)
    at mysite.uri.UriHandlerRequestProcessor.doHandle(UriHandlerRequestProcessor.java:69)
    at mysite.Dispatcher.doRequest(Dispatcher.java:64)
    at mysite.Dispatcher.doGet(Dispatcher.java:49)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    at mysite.Dispatcher.service(Dispatcher.java:102)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

It looks like a dropped connection causes this behavior. Is there a workaround for siege getting hung up on it? I’d think it should just mark that URL as failed and move on to the next.

Related:


Leave a Reply