Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] jetty hangs under high load

Lots of changes and improvements in Jetty 7.6.0+
Try Jetty 7.6.0.RC4

--
Joakim Erdfelt
joakim@xxxxxxxxxxx

http://webtide.com | http://intalio.com
(the people behind jetty and cometd)



On Thu, Jan 19, 2012 at 10:44 AM, Michele Rossi <michele.rossi@xxxxxxxxx> wrote:
Hi,
I just wanted to let you know that we can also reproduce


We use JMeter to simulate load on our server and Jetty starts to hang when the total throughput is around 100 requests per second with 10, 25 or 50 users.

The thread dump produced when the server is hanging doesn't seem to contain anything useful or obvious: there are no threads waiting for any locks for example.

It makes me think that it could be something in the NIO layer.


We are using Jetty 7.5.4 on Java 1.6.0_29 on Windows 7 SP1 64 bits.


I think this a pretty important bug to fix - please let me know if I can provide any more useful info to fix it.

We use the method below to create our Jetty server.

Many thanks,
Michele



--------------------------

private static Server createJettyServer() {
        Server server = new Server();

        QueuedThreadPool queuedThreadPool = new QueuedThreadPool(256) {
            @Override
            protected Thread newThread(final Runnable runnable) {
                Thread t = new Thread(runnable);
                t.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
                    @Override
                    public void uncaughtException(Thread t, Throwable e) {
                        log.error("Uncaught exception [" + e + "] on thread [" + t + "]", e);
                    }
                });
                return t;
            }
        };
        queuedThreadPool.setDaemon(true);
        queuedThreadPool.setName("my-jetty-pool");
        queuedThreadPool.setMaxStopTimeMs(30000);

        server.setThreadPool(queuedThreadPool);
        server.addLifeCycleListener(new MyAppLifeCycleListener());
        server.setStopAtShutdown(true);
        server.setSendServerVersion(true);
        server.setSendDateHeader(true);
        server.setGracefulShutdown(10000);
        server.setSendDateHeader(false);
        server.setSendServerVersion(false);

        SelectChannelConnector connector = new SelectChannelConnector();
       

        connector.setAcceptQueueSize(2048);
        connector.setMaxIdleTime(240000);
        connector.setPort(containerCfg.port);
        connector.setReuseAddress(false);

        server.addConnector(connector);

        return server;
    }


_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev



Back to the top