Jetty Logo
Version: 9.4.33.v20201020
Contact the core Jetty developers at www.webtide.com

private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services for sponsored feature development

Jetty Server Dump

Configuring the Jetty Server Dump
Extra ThreadPool Information
Using the Dump Feature via JMX
Explanation of the Dump Key
Jetty Server Dump Example

The dump feature in Jetty provides a snapshot of the bean containment tree of the main Jetty components together with a summary of their configuration. This includes threadpool, connectors, contexts, webapplications, servlets and so forth.

Configuring the Jetty Server Dump

You can request that Jetty do a dump immediately after starting and just before stopping by calling the appropriate setters on the Server instance. For embedded usage this can be used by calling the setters directly.

server.setDumpAfterStart(true);
server.setDumpBeforeStop(true);

Standalone Jetty uses two properties to control this behaviour which are referenced in jetty.xml to call these setters. These properties are jetty.server.dumpAfterStart and jetty.server.dumpBeforeStop.

These can be temporarily enabled by supplying these properties as command line arguments, or they can be enabled via the server.ini file (see Chapter 3, An Introduction to Jetty Configuration).

java -jar $JETTY_HOME/start.jar jetty.server.dumpAfterStart=true jetty.server.dumpBeforeStop=true

Extra ThreadPool Information

To get maximum detail from the QueuedThreadPool in the dump, you need to setDetailDump(true) on any instances of QueuedThreadPool you are using. This extra detail in the detailed dump consists of full stack traces for every running thread, and a list of queued jobs waiting to be run.

For embedded usage this can be used by calling the setters directly.

threadPool.setDetailedDump(true);

For standalone jetty you can enable the threadpool module and configure the jetty.threadPool.detailedDump property. See Managing Startup Modules for information on how to enable a module. This same property can also be set via the command line the same as the server dump property.

Using the Dump Feature via JMX

The dump method is on the Server instance and many of its nested components (Handlers, Connectors, and so forth). Dumps may be obtained by calling these methods either in code or via JMX (see Using JMX with Jetty).

The Server MBean has a dump() method, which dumps everything, plus a dumpStdErr() operation that dumps to StdErr rather than replying to JConsole.

Explanation of the Dump Key

  • +- bean is a java POJO that is contained by the parent object as a bean added with the addBean method.
  • += managed is a bean that is also a LifeCycle that is started and stopped with the parent object.
  • +~ unmanaged is a bean that is also a LifeCycle that is started and stopped with the parent object. It is typically shared with other objects (hence its children are not dumped).
  • +? auto is a bean that has been added to an unstarted parent. If it is a LifeCycle that is not started when the parent is started, then it is started and becomes a managed bean, otherwise it becomes either unmanaged or just a bean.
  • +: iterable is an object that is contained within an iterable field of the parent (eg a list, set etc).
  • +] array is an object that is contained within an array field of the parent.
  • +@ map is an object that is contained within an map field of the parent.
  • +> undefined is an object that is contained within the parent by an undefined relationship.

Jetty Server Dump Example

This is a dump of the OneServletContext embedded example with extra threadpool information:

Server@59906517{STARTED}[9.4.32-SNAPSHOT] - STARTED
+= QueuedThreadPool[qtp488044861]@1d16f93d{STARTED,8<=8<=200,i=2,r=4,q=0}[ReservedThreadExecutor@16267862{s=2/4,p=0}] - STARTED
|  += ReservedThreadExecutor@16267862{s=2/4,p=0} - STARTED
|  +> threads size=8
|  |  +> qtp488044861-13 RUNNABLE tid=13 prio=5 SELECTING
|  |  +> qtp488044861-15-acceptor-0@296e0338-ServerConnector@1e6d1014{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} RUNNABLE tid=15 prio=3 ACCEPTING
|  |  +> qtp488044861-17 TIMED_WAITING tid=17 prio=5 RESERVED
|  |  +> qtp488044861-19 RUNNABLE tid=19 prio=5
|  |  |  +> app//org.eclipse.jetty.http.pathmap.PathMappings.getMatch(PathMappings.java:130)
|  |  |  +> app//org.eclipse.jetty.servlet.ServletHandler.getMappedServlet(ServletHandler.java:591)
|  |  |  +> app//org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:474)
|  |  |  +> app//org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
|  |  |  +> app//org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
|  |  |  +> app//org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
|  |  |  +> app//org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
|  |  |  +> app//org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
|  |  |  +> app//org.eclipse.jetty.server.Server.handle(Server.java:516)
|  |  |  +> app//org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
|  |  |  +> app//org.eclipse.jetty.server.HttpChannel$$Lambda$102/0x000000010016d440.dispatch(Unknown Source)
|  |  |  +> app//org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
|  |  |  +> app//org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
|  |  |  +> app//org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
|  |  |  +> app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
|  |  |  +> app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
|  |  |  +> app//org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
|  |  |  +> app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
|  |  |  +> app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
|  |  |  +> app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
|  |  |  +> app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
|  |  |  +> app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
|  |  |  +> app//org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
|  |  |  +> app//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
|  |  |  +> java.base@11.0.5/java.lang.Thread.run(Thread.java:834)
|  |  +> qtp488044861-16 TIMED_WAITING tid=16 prio=5 RESERVED
|  |  +> qtp488044861-21 RUNNABLE tid=21 prio=5 SELECTING
|  |  +> qtp488044861-18 TIMED_WAITING tid=18 prio=5 IDLE
|  |  +> qtp488044861-14 TIMED_WAITING tid=14 prio=5 IDLE
|  +> jobs size=0
+= ServerConnector@1e6d1014{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} - STARTED
|  +~ Server@59906517{STARTED}[9.4.32-SNAPSHOT] - STARTED
|  +~ QueuedThreadPool[qtp488044861]@1d16f93d{STARTED,8<=8<=200,i=2,r=4,q=0}[ReservedThreadExecutor@16267862{s=2/4,p=0}] - STARTED
|  += ScheduledExecutorScheduler@453da22c{STARTED} - STARTED
|  |  +> java.base@11.0.5/jdk.internal.misc.Unsafe.park(Native Method)
|  |  +> java.base@11.0.5/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
|  |  +> java.base@11.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
|  |  +> java.base@11.0.5/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
|  |  +> java.base@11.0.5/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
|  |  +> java.base@11.0.5/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
|  |  +> java.base@11.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
|  |  +> java.base@11.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
|  |  +> java.base@11.0.5/java.lang.Thread.run(Thread.java:834)
|  +- org.eclipse.jetty.io.ArrayByteBufferPool@71248c21
|  += HttpConnectionFactory@3fd7a715[HTTP/1.1] - STARTED
|  |  +- HttpConfiguration@442675e1{32768/8192,8192/8192,https://:0,[]}
|  |     +> customizers size=0
|  |     +> formEncodedMethods size=2
|  |     |  +> POST
|  |     |  +> PUT
|  |     +> outputBufferSize=32768
|  |     +> outputAggregationSize=8192
|  |     +> requestHeaderSize=8192
|  |     +> responseHeaderSize=8192
|  |     +> headerCacheSize=1024
|  |     +> secureScheme=https
|  |     +> securePort=0
|  |     +> idleTimeout=-1
|  |     +> blockingTimeout=-1
|  |     +> sendDateHeader=true
|  |     +> sendServerVersion=true
|  |     +> sendXPoweredBy=false
|  |     +> delayDispatchUntilContent=true
|  |     +> persistentConnectionsEnabled=true
|  |     +> maxErrorDispatches=10
|  |     +> minRequestDataRate=0
|  |     +> minResponseDataRate=0
|  |     +> cookieCompliance=RFC6265
|  |     +> setRequestCookieCompliance=RFC6265
|  |     +> notifyRemoteAsyncErrors=true
|  |     +> relativeRedirectAllowed=false
|  += SelectorManager@ServerConnector@1e6d1014{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} - STARTED
|  |  += ManagedSelector@38364841{STARTED} id=0 keys=0 selected=0 updates=0 - STARTED
|  |  |  += EatWhatYouKill@28c4711c/SelectorProducer@59717824/PRODUCING/p=false/QueuedThreadPool[qtp488044861]@1d16f93d{STARTED,8<=8<=200,i=2,r=4,q=0}[ReservedThreadExecutor@16267862{s=2/4,p=0}][pc=0,pic=0,pec=0,epc=0]@2020-09-04T10:57:20.077669+10:00 - STARTED
|  |  |  |  +- SelectorProducer@59717824
|  |  |  |  +~ QueuedThreadPool[qtp488044861]@1d16f93d{STARTED,8<=8<=200,i=2,r=4,q=0}[ReservedThreadExecutor@16267862{s=2/4,p=0}] - STARTED
|  |  |  +> updates @ 2020-09-04T10:57:20.058489+10:00 size=0
|  |  |  +> keys @ 2020-09-04T10:57:20.061714+10:00 size=0
|  |  += ManagedSelector@146044d7{STARTED} id=1 keys=1 selected=0 updates=0 - STARTED
|  |     += EatWhatYouKill@1e9e725a/SelectorProducer@15d9bc04/PRODUCING/p=false/QueuedThreadPool[qtp488044861]@1d16f93d{STARTED,8<=8<=200,i=2,r=4,q=0}[ReservedThreadExecutor@16267862{s=2/4,p=0}][pc=0,pic=0,pec=1,epc=14]@2020-09-04T10:57:20.082696+10:00 - STARTED
|  |     |  +- SelectorProducer@15d9bc04
|  |     |  +~ QueuedThreadPool[qtp488044861]@1d16f93d{STARTED,8<=8<=200,i=2,r=4,q=0}[ReservedThreadExecutor@16267862{s=2/4,p=0}] - STARTED
|  |     +> updates @ 2020-09-04T10:57:20.078661+10:00 size=0
|  |     +> keys @ 2020-09-04T10:57:20.082035+10:00 size=1
|  |        +> SelectionKey@74bb45ed{i=0}->SocketChannelEndPoint@569ef11f{l=/127.0.0.1:8080,r=/127.0.0.1:58702,OPEN,fill=-,flush=-,to=3/30000}{io=0/0,kio=0,kro=1}->HttpConnection@25b03990[p=HttpParser{s=CONTENT,0 of -1},g=HttpGenerator@218fb9fe{s=START}]=>HttpChannelOverHttp@648d33ab{s=HttpChannelState@717b7e16{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=54,c=false/false,a=HANDLING,uri=//localhost:8080/,age=4}
|  +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:8080]
|  +- qtp488044861-15-acceptor-0@296e0338-ServerConnector@1e6d1014{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
+= AttributeContainerMap@473b46c3{size=0} - STARTED
+= o.e.j.s.ServletContextHandler@3ffcd140{/,file:///tmp/,AVAILABLE} - STARTED
|  += org.eclipse.jetty.server.session.SessionHandler1089504328==dftMaxIdleSec=-1 - STARTED
|  |  += ServletHandler@516be40f{STARTED} - STARTED
|  |  |  +> listeners ServletHandler@516be40f{STARTED} size=2
|  |  |  |  +> ListenerHolder@3c0a50da{STARTED}: org.eclipse.jetty.embedded.OneServletContext$InitListener - STARTED
|  |  |  |  +> ListenerHolder@646be2c3{STARTED}: org.eclipse.jetty.embedded.OneServletContext$RequestListener - STARTED
|  |  |  +> filters ServletHandler@516be40f{STARTED} size=2
|  |  |  |  +> org.eclipse.jetty.embedded.OneServletContext$TestFilter-e874448@e874448==org.eclipse.jetty.embedded.OneServletContext$TestFilter,inst=true,async=true - STARTED
|  |  |  |  |  +> org.eclipse.jetty.embedded.OneServletContext$TestFilter@797badd3
|  |  |  |  +> org.eclipse.jetty.embedded.OneServletContext$TestFilter-60285225@60285225==org.eclipse.jetty.embedded.OneServletContext$TestFilter,inst=true,async=true - STARTED
|  |  |  |     +> org.eclipse.jetty.embedded.OneServletContext$TestFilter@77be656f
|  |  |  +> filterMappings ServletHandler@516be40f{STARTED} size=2
|  |  |  |  +> [/test/*]/[]/[REQUEST]=>org.eclipse.jetty.embedded.OneServletContext$TestFilter-e874448
|  |  |  |  +> [*.test]/[]/[ASYNC, REQUEST]=>org.eclipse.jetty.embedded.OneServletContext$TestFilter-60285225
|  |  |  +> servlets ServletHandler@516be40f{STARTED} size=3
|  |  |  |  +> org.eclipse.jetty.embedded.HelloServlet-58c1670b@d20bf05b==org.eclipse.jetty.embedded.HelloServlet,jsp=null,order=-1,inst=false,async=true - STARTED
|  |  |  |  |  +> class org.eclipse.jetty.embedded.HelloServlet
|  |  |  |  +> debug@5b09653==org.eclipse.jetty.embedded.DumpServlet,jsp=null,order=-1,inst=false,async=true - STARTED
|  |  |  |  |  +> class org.eclipse.jetty.embedded.DumpServlet
|  |  |  |  +> org.eclipse.jetty.servlet.DefaultServlet-6b9651f3@8eb381d1==org.eclipse.jetty.servlet.DefaultServlet,jsp=null,order=-1,inst=true,async=true - STARTED
|  |  |  |     +> org.eclipse.jetty.servlet.DefaultServlet@78a2da20
|  |  |  +> servletMappings ServletHandler@516be40f{STARTED} size=4
|  |  |     +> [/hello/*]=>org.eclipse.jetty.embedded.HelloServlet-58c1670b
|  |  |     +> [/dump/*]=>debug
|  |  |     +> [*.dump]=>debug
|  |  |     +> [/]=>org.eclipse.jetty.servlet.DefaultServlet-6b9651f3
|  |  += org.eclipse.jetty.server.session.DefaultSessionCache@dd3b207[evict=-1,removeUnloadable=false,saveOnCreate=false,saveOnInactiveEvict=false] - STARTED
|  |  |  += org.eclipse.jetty.server.session.NullSessionDataStore@551bdc27[passivating=false,graceSec=3600] - STARTED
|  |  +~ DefaultSessionIdManager@58fdd99{STARTED}[worker=node0] - STARTED
|  +> No ClassLoader
|  +> eventListeners o.e.j.s.ServletContextHandler@3ffcd140{/,file:///tmp/,AVAILABLE} size=2
|  |  +> org.eclipse.jetty.embedded.OneServletContext$InitListener@6b1274d2
|  |  +> org.eclipse.jetty.embedded.OneServletContext$RequestListener@7bc1a03d
|  +> handler attributes o.e.j.s.ServletContextHandler@3ffcd140{/,file:///tmp/,AVAILABLE} size=1
|  |  +> org.eclipse.jetty.server.Executor=QueuedThreadPool[qtp488044861]@1d16f93d{STARTED,8<=8<=200,i=2,r=4,q=0}[ReservedThreadExecutor@16267862{s=2/4,p=0}]
|  +> context attributes o.e.j.s.ServletContextHandler@3ffcd140{/,file:///tmp/,AVAILABLE} size=2
|  |  +> org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=1]
|  |  +> X-Init=true
|  +> initparams o.e.j.s.ServletContextHandler@3ffcd140{/,file:///tmp/,AVAILABLE} size=0
+= ErrorHandler@ba8d91c{STARTED} - STARTED
+= DefaultSessionIdManager@58fdd99{STARTED}[worker=node0] - STARTED
|  += HouseKeeper@60438a68{STARTED}[interval=660000, ownscheduler=true] - STARTED
+> jdk.internal.loader.ClassLoaders$AppClassLoader@2c13da15
   +> jdk.internal.loader.ClassLoaders$PlatformClassLoader@7364985f
key: +- bean, += managed, +~ unmanaged, +? auto, +: iterable, +] array, +@ map, +> undefined

See an error or something missing? Contribute to this documentation at Github!(Generated: 2020-10-20)