bramhanandlingala opened a new pull request, #69608: URL: https://github.com/apache/airflow/pull/69608
## Description pgbouncer's preStop hook was signaling shutdown immediately with `killall -INT pgbouncer`, which meant the pod could exit before Kubernetes finished removing it from Service routing. Since pgbouncer exits as soon as its in-flight queries drain — often in well under a second for a lightly loaded pod — new connections kept getting routed to a pod that had already shut down, causing the dropped connections during rolling restarts described in #69571. The fix adds a short sleep before signaling shutdown, so Kubernetes has time to mark the pod as Terminating and propagate that to Service endpoints while pgbouncer is still accepting connections. Only after that does it send the interrupt signal to drain and stop pgbouncer. The updated command is `sleep 10 && killall -INT pgbouncer && sleep 20`, and the same string was updated consistently across `values.yaml`, `values.schema.json`, and the existing test in `test_container_lifecycle.py` that asserts on it. related: #69571 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
