-
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
fix(limit-conn): always save the data of the limit object, and release it in log phase. #2465
Conversation
@LY-GO you can make a try with this PR |
2.i modify the code of limit-conn according to your repair.But the response code is 500 |
|
I test the plugin,i find it don't work;now every request can success,even if number of request over concurrency limit.I just copy your code,overwrite a new plugin and reload the plugin |
two suggesstions: |
Is the note 2 caused the plugin didn't work in your test? Does it work after you set sleep time? |
@LY-GO please provide your plugin configuration. it maybe invalid. |
When you set sleep time in your procedure,you can use jmeter to test plugin and the plugin can work successfully. |
I think the problem is solved. What made the fix won't work is just the way of test (for example, the upstream doesn't hold the connection). |
I don't understand word "the upstream doesn't hold the connection" |
…nd release the statistical status in the log phase. fix #2450
@tokers @moonming @spacewander I have fixed the conflict, you can take a look |
rejected_code = 503, | ||
conn = 1, | ||
default_conn_delay = 0.1, | ||
rejected_code = 503, |
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.
why modify this test case?
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.
|
||
|
||
=== TEST 33: hit route and should not be limited | ||
--- pipelined_requests eval |
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.
Shouldn't the request be rejected here? I did not understand
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.
All requests are sent one after another, they are not concurrent.
So the request should never be limited for "conn": 1,
.
In the old code, it will be limited due to this bug.
What this PR does / why we need it:
fix #2450
Pre-submission checklist: