You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/01/28 09:33:54 UTC
[GitHub] [apisix] Yiyiyimu opened a new issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Yiyiyimu opened a new issue #3447:
URL: https://github.com/apache/apisix/issues/3447
### Issue description
In #3404, to test if chaos effect qps of apisix, I try to visit a route in the same frequency, calculate ingress bandwidth per second from prometheus metrics, and then compare before and after the chaos take effect.
The current frequency is 1 time/s, which is pretty slow I think and the reason is that, when frequency is larger than 1 time/s, some visit would return `"503 Service Unavailable"` and the test would fail. The only plugin enabled is prometheus and no request limit related plugins are enabled, so I'm not sure the reason of this.
### Environment
* apisix version (cmd: `apisix version`): v2.2
* OS: (cmd: `uname -a`) Ubuntu 18.04
* OpenResty / Nginx version: the one in v2.2-alpine docker
* etcd version, if have: v3.4.13
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Yiyiyimu commented on issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #3447:
URL: https://github.com/apache/apisix/issues/3447#issuecomment-769003001
I try to visit a route in an interval of 0.1s for 5s, and the whole test (including first set route and one time visit route to make sure it's set) running for ~9s. Out of 50 requests, I got 38 responses, 33 of which are 503, and the rest 5 of them are 200.
The info level is a bit messy and I failed to find useful information. I upload them into [gist](https://gist.github.com/Yiyiyimu/92cb4944db0fa256e0784e9ee21da3a6) for reference. The `positive.log` is the log when test running. I also upload the log after test as `negative.log`, it might be helpful to filter out unrelated logs.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis commented on issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #3447:
URL: https://github.com/apache/apisix/issues/3447#issuecomment-770785909
any news? @spacewander
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Yiyiyimu edited a comment on issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
Yiyiyimu edited a comment on issue #3447:
URL: https://github.com/apache/apisix/issues/3447#issuecomment-769003001
Thanks for the help @spacewander !
I try to visit a route in an interval of 0.1s for 5s, and the whole test (including first set route and one time visit route to make sure it's set) running for ~9s. Out of 50 requests, I got 38 responses, 33 of which are 503, and the rest 5 of them are 200.
The info level is a bit messy and I failed to find useful information. I upload them into [gist](https://gist.github.com/Yiyiyimu/92cb4944db0fa256e0784e9ee21da3a6) for reference. The `positive.log` is the log when test running. I also upload the log after test as `negative.log`, it might be helpful to filter out unrelated logs.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3447:
URL: https://github.com/apache/apisix/issues/3447#issuecomment-769013462
There is not valuable info in the log...
Do you make your etcd clean?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Yiyiyimu closed issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
Yiyiyimu closed issue #3447:
URL: https://github.com/apache/apisix/issues/3447
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Yiyiyimu commented on issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #3447:
URL: https://github.com/apache/apisix/issues/3447#issuecomment-789370225
Thanks to @nic-chen, the reason is that I use a dummy but existed URL `foo.com` as upstream. Built a local server fixed this problem
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Yiyiyimu commented on issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #3447:
URL: https://github.com/apache/apisix/issues/3447#issuecomment-769020726
Yes a fresh start etcd. Do I need to provide etcd logs?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Yiyiyimu commented on issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #3447:
URL: https://github.com/apache/apisix/issues/3447#issuecomment-770808480
@membphis spacewander gave me some suggestions to test on slack, but I haven't tested it. It's stuck my side 😬
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3447:
URL: https://github.com/apache/apisix/issues/3447#issuecomment-768944675
Is there something interesting in the error.log? You can decrease the log level to info.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Yiyiyimu commented on issue #3447: request help: visit route faster than 1 time/s would return "503 Service Unavailable"
Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #3447:
URL: https://github.com/apache/apisix/issues/3447#issuecomment-769022698
If you got time, maybe you could reproduce the error with the chaos test branch.
Just start any APISIX instance, comment out the original test (`TestGetSuccessWhenEtcdKilled`) and run the following one:
```
func Test(t *testing.T) {
e := httpexpect.New(t, host)
// check if everything works
setRoute(e, http.StatusCreated)
getRoute(e, http.StatusOK)
// run in background
go func() {
for i := 1; ; i++ {
go func() {
getRoute(e, http.StatusOK)
fmt.Println("###############################################")
}()
time.Sleep(100 * time.Millisecond) // so the time step would be 0.1s
}
}()
time.Sleep(5 * time.Second)
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org