Questions tagged [graceful-shutdown]

66 questions
7
votes
1 answer

How do I catch *and ignore* SIGINT in Node.js?

I've found a different post on a related topic (How to perform an async operation on exit), but perhaps it doesn't apply to macOS, or just isn't true anymore when running Node.js v14. My original question was more complicated. I couldn't get…
kshetline
  • 12,547
  • 4
  • 37
  • 73
4
votes
1 answer

Celery task re-queued into broker on graceful shutdown when run locally but get lost in kubernetes despite same configs

I have a celery running in k8 pod. This is my manifest for celery apiVersion: apps/v1 kind: Deployment metadata: name: celery labels: deployment: celery spec: replicas: 2 selector: matchLabels: pod: celery template: …
3
votes
1 answer

Is suppressing `asyncio.CancelledError` acceptable here?

Example: with suppress(asyncio.CancelledError): [await t for t in asyncio.all_tasks(loop=self.loop) if t is not asyncio.current_task()] To avoid Task was destroyed but it is pending! warning, I have to await the tasks after…
Break
  • 332
  • 3
  • 19
3
votes
1 answer

Spring Boot 2.3 Liveness Probe feature fails in graceful shutdown

I'm testing the new feature graceful shutdown in Spring Boot 2.3 (server.shutdown=graceful and Tomcat Web server) with Kubernetes terminationGracePeriodSeconds field. When the graceful shutdown phase starts, new HTTP requests are rejected as…
2
votes
0 answers

How to gracefully shutdown spring boot app using configuration and programatically?

I want to gracefully shutdown my spring boot application. I wanted to know what is the difference between configuring it via application.yaml file and programmatically ? in my application yaml file, i have added this from reference…
MiGo
  • 551
  • 2
  • 7
  • 17
2
votes
0 answers

Tomcat forcefully closing keep-alive connections during graceful shutdown

I'm using Embedded Tomcat 9.0.68 in a Spring Boot app. In front I have a load-balancer (not HTTP aware). Unfortunately, when scaling down the app I see some errors despite of the fact that the app shuts down cleanly (I'm using…
mv123
  • 21
  • 1
2
votes
1 answer

Is it safe to shutdown go application running inside a container this way on `docker kill --signal=SIGX`?

Context There is an app running inside docker container. When docker stop %container_id% is sent the container receives SIGTERM. This signal is handled inside golang application via executing cleanup code before exiting. In this case code is a…
mcv_dev
  • 338
  • 3
  • 14
2
votes
2 answers

Changing terminationGracePeriodSeconds value doesn't getting effected during new release

I have to changed the terminationGracePeriodSeconds from 30 to 120 in Kubernetes deployment manifest file but when I am deploying using helm: helm upgrade --install --values The old pods getting terminated immediately…
2
votes
1 answer

How long does it take for Kubernetes to remove a terminating pod from Endpoints?

We are using Spring Boot in Kubernetes in our project. Recently we decided to add graceful shutdown for our application in order to ensure seamless deployments and make sure no requests are failed during pod terminations for whatever reason. Even…
2
votes
1 answer

grpc server and gateway shutdown order

my gRPC service uses grpc-gateway to serve http requests. in order to make the service shutdown gracefully, is there an order i need to pay attention to? i.e. is the shutdown order A. gRPC service -> gateway B. gateway -> gRPC service the only…
kimmy
  • 21
  • 1
2
votes
0 answers

In windows container, how to graceful shutdown asp.net core application?

In windows container, how to graceful shutdown asp.net core application? I want use external process(ex: bash,powershell,dotnet core console application) to update my external module dll(be using by Assembly.Load). So I need to stop my application…
2
votes
1 answer

How to adjust the graceful shutdown period in sidecar

Would like to know if there are any setting to adjust the graceful shutdown period for sidecar container in kubernetes? As we have found out that the period is too short and want to extend it.
hellowong
  • 119
  • 12
2
votes
1 answer

SpringApplication.exit() retuns java.lang.InterruptedException: null

Recently, I have upgraded the spring boot version from 2.3.4 to 2.4.2. I had below code to gracefully shutdown the application. taskScheduler.schedule(() -> SpringApplication.exit(applicationContext, () -> 0), Instant.now().plus(30,…
1
vote
2 answers

How to gracefully shutdown or close Node.Js Express app

Motivation I want to ensure there is no brute (sub-)process termination and that any open requests are fulfilled when the Express server is closing. import express, { Express, Request, Response } from 'express'; // Initialize the Express server…
Monero Jeanniton
  • 441
  • 8
  • 20
1
vote
1 answer

Reactor Kafka Graceful Shutdown and Pause Consumer

Spring Application uses Reactor Kafka to consume messages. Question 1: Is there standard convention to pause message consumption and finish processing inflight messages during application shutdown? Current implementation is to use…
1
2 3 4 5