Loading

RTF Application Graceful Shutdown Behavior and Configuring shutdownTimeout

Udgivelsesdato: Jun 16, 2026
Beskrivelse

When stopping a Mule application deployed on Runtime Fabric (RTF) via the Anypoint Platform control plane (clicking the "Stop" button in Runtime Manager), some questions arise regarding whether in-flight transactions will complete or if data loss may occur:

  • Will the application finish processing current transactions before stopping?
  • How long does the application wait before forcefully shutting down?
  • Can the graceful shutdown period be extended?
Løsning

Default Behavior

By default, when an RTF application is stopped via the control plane:

  1. The Mule runtime receives a shutdown signal.
  2. It allows up to 5 seconds (default shutdownTimeout) for in-flight transactions to complete.
  3. After the timeout expires, the runtime forces shutdown regardless of transaction state.

Configuring shutdownTimeout (Application Level)

To allow more time for in-flight transactions to complete, configure the shutdownTimeout parameter in your Mule application. Refer to:

Configure Shutdown Timeout — MuleSoft Documentation

Configuring terminationGracePeriodSeconds (Infrastructure Level)

Important: If you set shutdownTimeout to a value greater than 30000 milliseconds, you must also increase the Kubernetes terminationGracePeriodSeconds to match. Otherwise, Kubernetes will forcefully terminate the pod at 30 seconds.

  • If using Anypoint Controller for Kubernetes: You can configure terminationGracePeriodSeconds to a value greater than 30 seconds. See: Deploy Mule Apps with Anypoint Controller
  • If NOT using Anypoint Controller: Configuring terminationGracePeriodSeconds beyond 30 seconds is not currently supported.

Recommendations

  • Set shutdownTimeout to a value that accommodates your longest expected transaction.
  • Ensure terminationGracePeriodSeconds is always greater than or equal to shutdownTimeout.
  • For critical flows, implement idempotent processing and reliability patterns to handle cases where transactions may be interrupted.
Vidensartikelnummer

005387181

 
Indlæser
Salesforce Help | Article