intermediateCompany & Architect-Level

What is graceful shutdown in Spring Boot? How do you configure it?

Set server.shutdown=graceful and spring.lifecycle.timeout-per-shutdown-phase=30s — on SIGTERM, Spring Boot stops accepting new requests but waits for in-flight ones to finish (up to the timeout) before shutting down. Align this timeout with Kubernetes' terminationGracePeriodSeconds so the two don't fight each other.

This is a Pro question

Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.

What is graceful shutdown in Spring Boot? How do you configure it?

Next Step

Browse other categories →← Back to all Spring Boot & Microservices questions