JBoss shutdown is stalled in Connector.pause

Solution Verified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 6.x

Issue

  • JBoss shutdown is stalled in Connector.pause:
"JBoss Shutdown Hook" daemon prio=10 tid=0x00007f81a400a800 nid=0x2a17 waiting on condition [0x00007f80e4214000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at org.apache.coyote.http11.Http11Protocol.pause(Http11Protocol.java:228)
	at org.apache.catalina.connector.Connector.pause(Connector.java:1044)
	at org.jboss.web.tomcat.service.deployers.TomcatService.stopConnectors(TomcatService.java:649)
	at org.jboss.web.tomcat.service.deployers.TomcatService.handleNotification(TomcatService.java:679)
	at sun.reflect.GeneratedMethodAccessor218.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
	at $Proxy173.handleNotification(Unknown Source)
	at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
	at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
	at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
	at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
	at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:556)
	at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:909)

Resolution

  • Address any issues causing stalled or long running requests.
  • Lower the org.apache.coyote.MAX_PAUSE_WAIT system property to a desired value to limit the connector pause wait time that occurs at shutdown.

Root Cause

  • JBoss is waiting for in process requests to complete before shutting down the connector. This wait is capped by the org.apache.coyote.MAX_PAUSE_WAIT system property (default 300 seconds).

Diagnostic Steps

  • Check thread dumps for in process requests (calling CoyoteAdapter.service) that are preventing the connector shutdown.
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.