Wildfly Timeout Exception

Are you new to Wildfly (10.1)?  Are you a developer for an Enterprise Application which deals with lot of database operation during application start up?  If yes, you might have definitely seen Wildfly throwing Timeout Exception  to your surprise. The detailed exception trace might be something like below,

ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.server.DeployerChainAddHandler$FinalRuntimeStepHandler@1f3457fd for operation 
 {"operation" => "add-deployer-chains","address" => []} at address [] failed handling operation rollback -- java.util.concurrent.TimeoutException: java.util.concurrent.TimeoutException
 at org.jboss.as.controller.OperationContextImpl.waitForRemovals(OperationContextImpl.java:498)
 at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1369)
 at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1328)

Widlfly offers two different timeout options. They are

  1. Deployment timeout (deployment-timeout) in standalone.xml under deployment scanner.
  2. Command line argument called “jboss.as.management.blocking.timeout”

Based on my analysis both of these timeouts offer same functionality. The deployment-timeout configuration available in standalone.xml is represented in Long and the default value is 60 seconds.  Refer this page for more details about deployment scanner. The command line argument is represented as Integer and the default value is 300 seconds.

I have seen both are meant for the same purpose however for my application the deployment scanner configuration is like below,

<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" 
 scan-interval="-1" deployment-timeout="${jboss.as.management.blocking.timeout:900}" 

Yes, I did set my deployment-timeout as my command line option to have both timeout as same ! My understanding is that the command line option takes precedence. But I was not sure when my application will fail because of lesser value in deployment-timeout and hence I used above configuration which works for me with out any issues !


WP2Social Auto Publish Powered By : XYZScripts.com