Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-7146

Fixed timeout in Bootablejar#waitForShutdown()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 28.0.0.Beta3
    • Bootable JAR
    • None
    • Hide
      • Make a bootable jar with a slow rest-endpoint that returns after 15s 
      • Make sure property org.wildfly.sigterm.suspend.timeout=30 is set
      • Make a call
      • Send SIGTERM application

      Results in

      13:54:40,956 INFO  [org.jboss.as.server] (Thread-2) WFLYSRV0211: Suspending server with 30000 ms timeout.
      13:54:40,966 INFO  [org.jboss.as.ejb3] (Thread-2) WFLYEJB0493: Jakarta Enterprise Beans subsystem suspension complete
      13:54:50,982 WARN  [org.wildfly.jar] (installation-cleaner) WFLYJAR0024: The container has not properly shutdown within 10s.

       

      We are using bootable in k8s and this behaviour results in aborted users on redeploy

      Show
      Make a bootable jar with a slow rest-endpoint that returns after 15s  Make sure property org.wildfly.sigterm.suspend.timeout=30 is set Make a call Send SIGTERM application Results in 13:54:40,956 INFO   [org.jboss.as.server] (Thread-2) WFLYSRV0211: Suspending server with 30000 ms timeout. 13:54:40,966 INFO   [org.jboss.as.ejb3] (Thread-2) WFLYEJB0493: Jakarta Enterprise Beans subsystem suspension complete 13:54:50,982 WARN   [org.wildfly.jar] (installation-cleaner) WFLYJAR0024: The container has not properly shutdown within 10s.   We are using bootable in k8s and this behaviour results in aborted users on redeploy

      Fixed timeout in  Bootablejar#waitForShutdown() makes any long running action >10s fail 

      Minimal change is to make  Bootablejar#waitForShutdown() wait for value set by system property org.wildfly.core.bootable.jar.timeout.
      This property is used in InstallationCleaner. And i struggle to see why this is different (and hardcoded to 10s) in waitForShutdown.

      Perhaps should org.wildfly.core.bootable.jar.timeout be replaced with well documented org.wildfly.sigterm.suspend.timeout + some additional time.
      Cleanup will always have potential to fail in case org.wildfly.core.bootable.jar.timeout is less than org.wildfly.sigterm.suspend.timeout  

      Another problem is that org.wildfly.core.bootable.jar.timeout is read statically and cannot be set with a system property inside wildfly. This forces usage
      of this property to be java -jar -Dorg.wildfly.core.bootable.jar.timeout=30 bootable.jar. 

              jdenise@redhat.com Jean Francois Denise
              joachim.torstensson@gmail.com Joachim Torstensson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: