-
Notifications
You must be signed in to change notification settings - Fork 93
Feat(Support): About the retries attribute of the service object #4957
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
base: main
Are you sure you want to change the base?
Changes from all commits
86fb497
afdff9f
23736c8
8f31526
d6840cf
5dda810
155080b
620854d
460cfe8
2b05e64
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,106 @@ | ||||||
| --- | ||||||
| title: About the retries attribute of the service object | ||||||
| content_type: support | ||||||
| description: How Kong's retry behavior works for service objects, including how to observe retries in debug logs. | ||||||
| products: | ||||||
| - gateway | ||||||
| works_on: | ||||||
| - on-prem | ||||||
| - konnect | ||||||
| tldr: | ||||||
| q: How do I check the behavior of the retries attribute? | ||||||
| a: | | ||||||
| When an upstream is unreachable, Kong retries the connection up to the configured number of times. You can observe this in debug logs. | ||||||
| faqs: | ||||||
| - q: Does the service object only retry when an upstream object is set? | ||||||
| a: No, the service object can retry requests even if an upstream object has not been set. | ||||||
| - q: Does the service object retry on HTTP 4xx/5xx responses? | ||||||
| a: No, retries happen only for TCP connection errors. However, {{site.base_gateway}} can perform HTTP and TCP health checks using the upstream object. For more details, see the Health Checks and Circuit Breakers documentation. | ||||||
| --- | ||||||
|
|
||||||
| ## How to check the behavior of the retries attribute | ||||||
|
|
||||||
| 1. Set `KONG_LOG_LEVEL=debug` and reload {{site.base_gateway}}. | ||||||
|
|
||||||
| In your container, set `KONG_LOG_LEVEL` to `debug` | ||||||
|
|
||||||
| ```bash | ||||||
| echo "KONG_LOG_LEVEL=debug kong reload exit" | docker exec -i kong-ee /bin/sh | ||||||
| ``` | ||||||
|
|
||||||
| 2. Run the httpbin container. | ||||||
|
|
||||||
| ```bash | ||||||
| docker run -d --name httpbin --network=kong-ee-net -p 80:80 kong/httpbin | ||||||
|
||||||
| docker run -d --name httpbin --network=kong-ee-net -p 80:80 kong/httpbin | |
| docker run -d --name httpbin --network=kong-ee-net kong/httpbin |
Copilot
AI
Apr 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The container name is inconsistent (docker exec ... kong-ee earlier vs docker logs -f kong-ent here); use a single container name (or a placeholder like KONG_CONTAINER_ID) throughout the steps to avoid confusion.
| docker logs -f kong-ent | |
| docker logs -f kong-ee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
docker execcommand includesexitas an extra argument tokong reloadand won’t actually runexitas a separate shell command; update the snippet to separate the commands properly (or usedocker exec -e KONG_LOG_LEVEL=debug ... kong reload) so the instructions work as written.