Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-17620

Graceful shutdown starts a lot of time after receiving the TERM signal

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 19.0.0.Final
    • OpenShift, Web (Undertow)
    • None
    • Hide
      1. Deploy wildfly on Kubernetes
      2. Deploy a Web application with a simple JAX-RS endpoint
      3. Launch a JMeter test with a single thread which calls the endpoint indefinitely
      4. Executes a Kubernetes rollout of the deployment
      5. JMeter test will get 503 errors
      Show
      Deploy wildfly on Kubernetes Deploy a Web application with a simple JAX-RS endpoint Launch a JMeter test with a single thread which calls the endpoint indefinitely Executes a Kubernetes rollout of the deployment JMeter test will get 503 errors
    • ---
    • ---

      The use case is Graceful Shutdown in a Kubernetes environment. The current Wildfly instance receives a TERM signal and the new instance is ready for accepting new HTTP client connections.  

      The graceful shutdown process starts many seconds after receiving the TERM signal. After receiving the TERM signal, Wildfly still responds to incoming HTTP requests. 

      Moreover, during the SUSPENDING state, Wildfly should respond with HTTP Close Connection header, giving a chance to clients which use a persistent connection of creating a new connection to the new Wildfly instance.

       

      For example, these are the logs:

      2023-02-07 11:44:55,927 [default task-1] INFO  [ems-ppm-app-ws,8361c42f1030ce13] it.tasgroup.ems.ppm.web.rs.config.LoggingFilter - Received GET request to URL http://ems-ppm-app-ws-unipol:8080{{{}

      ERROR *** WildFly wrapper process (1) received TERM signal ***{}}}

      2023-02-07 11:44:55,986 [default task-1] INFO  [ems-ppm-app-ws,66ecfbb997f621ce] it.tasgroup.ems.ppm.web.rs.config.LoggingFilter - Received GET request to URL http://ems-ppm-app-ws-unipol:8080

      .....

      ..........

      11:44:59,609 INFO  [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0211: Suspending server with 60000 ms timeout.

       

      Wildfly actually goes into SUSPENDING state after 5 seconds and does not close persistent (i.e Keep-Alive) connections.

       

       

       

              jmesnil1@redhat.com Jeff Mesnil
              antonio.derrico@tasgroup.it Antonio D'Errico (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: