-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Current Behavior
Restarting APISIX while it is handling continuous requests leads to intermittent 503 Service Unavailable responses.
I have prepared a minimal reproducible setup. The file structure looks like this:
├── apisix
│ ├── apisix.yaml
│ └── config.yaml
├── nginx
│ └── default.conf
├── init.sh
├── restart.sh
└── test.sh
Once unpacked, the issue can be reproduced easily on any machine that has Docker and curl installed.
- Run init.sh to launch Consul and the upstream NGINX container that APISIX will route traffic to.
- Run restart.sh to start APISIX.
- Run test.sh, which sends continuous requests to APISIX. At first, all responses should return HTTP status code 200.
- While test.sh is running, repeatedly execute restart.sh to restart APISIX.
- After restarting, even when the new APISIX instance is up and running normally, you will still see intermittent 503 errors in the output of test.sh.
This indicates that APISIX fails to route traffic correctly after a restart, despite the upstream and service discovery being healthy.
Expected Behavior
After restarting APISIX, once it has successfully started and is healthy, it should be able to route traffic to upstream services registered in Consul without returning 503 errors.
Error Logs
When test.sh starts to show 503 responses, you can check the APISIX container logs to see detailed error messages. These logs provide insight into why the requests failed, such as upstream discovery or routing issues.
Steps to Reproduce
- Unpack the minimal test setup files.
- Run: ./init.sh
- Start APISIX: ./restart.sh
- Start testing: ./test.sh
- In a separate terminal, repeatedly run: ./restart.sh
- Watch test.sh output — it will gradually show 503 errors.
Environment
Metadata
Metadata
Assignees
Labels
Type
Projects
Status