Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 503 response bypasses num_retries #19

Open
bfosberry opened this issue Apr 23, 2024 · 0 comments
Open

HTTP 503 response bypasses num_retries #19

bfosberry opened this issue Apr 23, 2024 · 0 comments

Comments

@bfosberry
Copy link

When num_retries is specified, regardless of whether the number of retries has been met, the service will be restarted if the http check gets a 503 back. The following log is from a check with -r 10

2024/04/23 22:39:06 [mysql5306_check] Received TICK_5 event from supervisor
2024/04/23 22:39:07 [mysql5306_check] No processes in state RUNNING found for process mysql5306
2024/04/23 22:39:11 [mysql5306_check] Received TICK_5 event from supervisor
2024/04/23 22:39:11 [mysql5306_check] Performing `http` check for process name mysql5306
2024/04/23 22:39:11 [mysql5306_check] HTTPCheck: Querying URL http://127.0.0.1:7035/check for process mysql5306
2024/04/23 22:39:11 [mysql5306_check] HTTPCheck: Status contacting URL http://127.0.0.1:7035/check for process mysql5306: 503 Service Unavailable
2024/04/23 22:39:11 [mysql5306_check] HTTPCheck: Check failed: Bad HTTP status code: 503
2024/04/23 22:39:11 [mysql5306_check] `http` check failed for process mysql5306. Trying to restart.
2024/04/23 22:39:11 [mysql5306_check] Trying to stop process mysql5306
2024/04/23 22:39:11 [mysql5306_check] Stopped process mysql5306
2024/04/23 22:39:11 [mysql5306_check] Starting process mysql5306
2024/04/23 22:39:15 [mysql5306_check] Received TICK_5 event from supervisor
2024/04/23 22:39:16 [mysql5306_check] No processes in state RUNNING found for process mysql5306
2024/04/23 22:39:21 [mysql5306_check] Received TICK_5 event from supervisor
2024/04/23 22:39:22 [mysql5306_check] Performing `http` check for process name mysql5306
2024/04/23 22:39:22 [mysql5306_check] HTTPCheck: Querying URL http://127.0.0.1:7035/check for process mysql5306
2024/04/23 22:39:22 [mysql5306_check] HTTPCheck: Status contacting URL http://127.0.0.1:7035/check for process mysql5306: 503 Service Unavailable
2024/04/23 22:39:22 [mysql5306_check] HTTPCheck: Check failed: Bad HTTP status code: 503
2024/04/23 22:39:22 [mysql5306_check] `http` check failed for process mysql5306. Trying to restart.
2024/04/23 22:39:22 [mysql5306_check] Trying to stop process mysql5306

My expectation here is that even with a 503 or connection refused response, the check would honor the retries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant