From 8cecb00aa9aea7a579138a0ab55aee006d88abc3 Mon Sep 17 00:00:00 2001 From: nishantmonu51 Date: Tue, 30 Sep 2014 14:22:16 +0530 Subject: [PATCH] upgrade jetty and workaround for half open connection Upgrade jetty and set acceptor priority delta to -1 to give priority to servicing connections already accepted rather than opening new connections. --- pom.xml | 8 ++++---- .../io/druid/server/initialization/JettyServerModule.java | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 20c89c4c3ba..1ad6ccb9338 100644 --- a/pom.xml +++ b/pom.xml @@ -324,22 +324,22 @@ org.eclipse.jetty jetty-server - 9.2.2.v20140723 + 9.2.3.v20140905 org.eclipse.jetty jetty-servlet - 9.2.2.v20140723 + 9.2.3.v20140905 org.eclipse.jetty jetty-servlets - 9.2.2.v20140723 + 9.2.3.v20140905 org.eclipse.jetty jetty-proxy - 9.2.2.v20140723 + 9.2.3.v20140905 joda-time diff --git a/server/src/main/java/io/druid/server/initialization/JettyServerModule.java b/server/src/main/java/io/druid/server/initialization/JettyServerModule.java index f89329c5802..9cf3763caa7 100644 --- a/server/src/main/java/io/druid/server/initialization/JettyServerModule.java +++ b/server/src/main/java/io/druid/server/initialization/JettyServerModule.java @@ -158,6 +158,9 @@ public class JettyServerModule extends JerseyServletModule ServerConnector connector = new ServerConnector(server); connector.setPort(node.getPort()); connector.setIdleTimeout(Ints.checkedCast(config.getMaxIdleTime().toStandardDuration().getMillis())); + // workaround suggested in - + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=435322#c66 for jetty half open connection issues during failovers + connector.setAcceptorPriorityDelta(-1); server.setConnectors(new Connector[]{connector});