Kohei Nozaki's blog 

Setting longer startup / shutdown timeout to wildfly-init-redhat.sh


Posted on Friday Feb 27, 2015 at 03:27PM in WildFly


I’m using bin/init.d/wildfly-init-redhat.sh to operate WildFly instance via service command on CentOS. it has some timeout defaults as follows:

if [ -z "$STARTUP_WAIT" ]; then
        STARTUP_WAIT=30
fi

if [ -z "$SHUTDOWN_WAIT" ]; then
        SHUTDOWN_WAIT=30
fi

If startup or shutdown takes longer than 30 seconds, the service commands will stop waiting and finished. this brings trouble to some automation mechanism such as shell scripts for deployment on cheaper environment. these variables can be set more longer in /etc/default/wildfly.conf as follows.

## The amount of time to wait for startup
STARTUP_WAIT=1800

## The amount of time to wait for shutdown
SHUTDOWN_WAIT=1800

There’s a template for this file at bin/init.d/wildfly.conf in WildFly distribution.