fix: increase supervisor max_restarts across all RabbitMQ-consuming services#982
Open
cchristous wants to merge 3 commits into
Open
Conversation
…suming services Extends the fix from semaphoreio#972 (secrethub only) to all 16 remaining services that use Tackle.Consumer or Tackle.Multiconsumer. During Amazon MQ maintenance windows, RabbitMQ force-closes all AMQP connections with CONNECTION_FORCED. With the default max_restarts of 3 (in 5 seconds), the OTP supervisor terminates the entire application instead of allowing workers to reconnect. This causes unnecessary pod crashes and restarts. Services fixed: audit, gofer, pre_flight_checks, rbac (CE + EE), front, github_notifier, guard, hooks_processor, notifications, periodic_scheduler, plumber/ppl, plumber/block, projecthub, public-api, repository_hub.
loadez
approved these changes
Apr 20, 2026
Contributor
loadez
left a comment
There was a problem hiding this comment.
LGTM but please rebase because there are some cves that are probably fixed on main already
Contributor
Author
Done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
max_restarts: 1000to the top-level OTP Application supervisor options in each serviceContext
During Amazon MQ weekly maintenance, RabbitMQ nodes enter maintenance mode and force-close all AMQP connections with
CONNECTION_FORCED. With the OTP defaultmax_restartsof 3 (in 5 seconds), the supervisor interprets the burst of child process restarts as a fatal condition and terminates the entire application — killing all children including healthy ones (gRPC servers, HTTP endpoints, etc.).This was already fixed for SecretHub in #972 after it caused OIDC outages. However, the same vulnerability exists in all other RabbitMQ-consuming services. We observed this on 2026-04-15 when the stage cluster's pod restart alarm fired —
github-notifier-consumer,rbac-workers,ui-cache-reactor, andsecrethuball crashed simultaneously at 23:12 UTC during the Wednesday 22:00 UTC maintenance window.Services fixed
ee/audit/lib/audit/application.exee/gofer/lib/gofer/application.exee/pre_flight_checks/lib/pre_flight_checks/application.exee/rbac/lib/rbac/application.exfront/lib/front/application.exgithub_notifier/lib/github_notifier/application.exguard/lib/guard/application.exhooks_processor/lib/hooks_processor/application.exnotifications/lib/notifications/application.experiodic_scheduler/scheduler/lib/scheduler/application.explumber/block/lib/block/application.explumber/ppl/lib/ppl/application.exprojecthub/lib/projecthub/application.expublic-api/v2/lib/public_api/application.exrbac/ce/lib/rbac/application.exrepository_hub/lib/repository_hub/application.exWhy this is safe
max_restarts: 1000with the defaultmax_seconds: 5means the supervisor tolerates up to 1000 child restarts in a 5-second window before terminating. A RabbitMQ maintenance event causes a brief burst that's well under this, while a genuinely broken child would still be caught by Kubernetes liveness probes and Sentry error reporting.secrethub,badge,branch_hub, andzebra.one_for_onestrategy means individual child crashes don't affect siblings —max_restartsonly controls when the supervisor itself gives up.Test plan