Skip to content
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

When high concurrent requests may cause connection leak #5971

Open
semistone opened this issue Jun 19, 2024 · 2 comments
Open

When high concurrent requests may cause connection leak #5971

semistone opened this issue Jun 19, 2024 · 2 comments
Milestone

Comments

@semistone
Copy link

semistone commented Jun 19, 2024

Redis version

7.0.11

Redisson version

3.30.0

Redisson configuration

    Config config = new Config();
    config.setCodec(new StringCodec());
    config.setNettyThreads(64);
    config.useSingleServer().setAddress("redis://127.0.0.1:6379").setTimeout(5000).setConnectionMinimumIdleSize(1)
            .setConnectTimeout(500)
            .setPingConnectionInterval(100)
            .setKeepAlive(true)
            .setRetryAttempts(3)
            .setIdleConnectionTimeout(100)
            .setConnectionPoolSize(1);

What is the Expected behavior?

do 1000 set/get request parallel
it should success or failure but
connection will recover after some time later

increase connection pool size will fix this issue, but why connection broken.
and I guess that's the reason why we see timeout error in our production server.

What is the Actual behavior?

connection never recover

Additional information

I had write a reproduce procedure in
https://github.com/semistone/redission-issue/

@semistone

This comment was marked as outdated.

@semistone
Copy link
Author

semistone commented Jun 22, 2024

I found in current code,
when high load, queue is always >=0
if current code,
it will get Semaphore -> handle request1 -> get Semaphore -> handle request 2 ....
until it goes too deep
and at some point, that thread seem just disappear. ( I found the debug counter disappear in strange place )

I change to switch thread per 100 rquests
#5977

and that connection leak seems been fixed in my test code
not sure is it correct?
@mrniko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants