-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
bug: 'limit-conn' plugin seems working in an unexpected manner #2985
Comments
https://github.com/apache/apisix/blob/v2.1/apisix/plugins/limit-conn.lua#L88-L94 I think these code should be something like this:
|
@wfgydbu |
Sure. I'd like to. |
@spacewander I have ran some tests based on your modifications in #2465, looks fine on my machine. |
fixed the conflict right now ^_^ |
Solved by #2465 |
Issue description
'limit-conn' plugin seems working in an unexpected manner
Environment
apisix version
):2.1Minimal test code / Steps to reproduce the issue
make deps
,make init
,make run
limit-conn
:ab -c 1 -n 40 http://127.0.0.1:9080/
at least 3 times (let the number of requests exceeds limit value: 100) or more.This command means to send 40 requests one by one.
What's the actual result? (including assertion message & call stack if applicable)
Starting from the third round, after sending the 100th request. All the following requests will be blocked with 503 Code. It looks like the limitation works in a cumulative manner, not in a cocurrent manner.
What's the expected result?
the limit should never be touched and all requests should return 200 OK.
The text was updated successfully, but these errors were encountered: