Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
2.0.14.Final
-
None
-
-
High
-
59166217
Description
I am seeing a constant increase in the number of open pipes while running embedded undertow.
The following are the undertow server settings -
final Undertow.Builder builder = Undertow.builder()
//.addHttpsListener("port", "0.0.0.0", sslContext)
.addHttpListener(4080, "0.0.0.0")
.setSocketOption(Options.SSL_CLIENT_AUTH_MODE, SslClientAuthMode.REQUESTED)
.setSocketOption(Options.CONNECTION_LOW_WATER, 1000)
.setSocketOption(Options.CONNECTION_HIGH_WATER, 1100)
.setBufferSize(1024 * 16)
.setIoThreads(Math.max(config.4, Runtime.getRuntime().availableProcessors() - 1))
.setSocketOption(Options.BACKLOG, 2048)
.setServerOption(UndertowOptions.ALWAYS_SET_DATE, true)
.setServerOption(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, true)
.setServerOption(Options.SSL_ENABLED_CIPHER_SUITES, CIPHER_SUITES)
.setHandler(Handlers.header(Handlers.path().addPrefixPath("/", getRestEasyServlet(config)),
Headers.SERVER_STRING, "Mock Server"))
.setWorkerThreads(1000);
undertow = builder.build();
undertow.start();
I have a simple API which sleeps for 200ms and returns a static 100KB json response.
@GET
@Path("/v1/channels/api")
@Produces(MediaType.APPLICATION_JSON)
public Response get(@QueryParam("sleep") String sleep) {
if (sleep != null && !sleep.isEmpty() && Integer.valueOf(sleep) > 0) {
try
catch (InterruptedException e)
{ LOG.warn("Service Interrupted - " + e.getMessage()); }}
return Response.status(200).entity(json).build();
}
Ran apache_benchmark with keep alive (-k) and 1 thread (c -1) -
ab -t 9999 -k -n 1000 -c 1 host
When I do lsof -p pid I see the steady increase in the number of pipes. To eliminate the possibility of ab being an issue I tried running with the PoolingHttpClient but I see the same issue.