-
Notifications
You must be signed in to change notification settings - Fork 447
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
How to create a single redis connection #261
Comments
did you call the set_keepalive to put the connection to the pool? |
Yes, set_keepalive is there after connect. |
Even if set_keepalive wasn't there. It shouldn't have created 5 connection. Right ? |
Please show your code that can reproduce the problem |
@zhuizhuhaomeng |
I have tried creating a connection with pool_size = 1 and backlog=10 but every concurrent request creating new connection.
For 5 concurrent request this is the output.
netstat | grep redis
tcp 0 0 app-server:15174 app-redis-:6375 ESTABLISHED
tcp 0 0 app-server:14600 app-redis-:6375 ESTABLISHED
tcp 1 0 app-server:2666 app-redis-:6375 CLOSE_WAIT
tcp 0 0 app-server:15156 app-redis-:6375 ESTABLISHED
tcp 0 0 app-server:15158 app-redis-:6375 ESTABLISHED
tcp 0 0 app-server:15170app-redis-:6375 ESTABLISHED
Ideally it should have created 1 connection and queued the rest 4. Right ? Is this a issue from my side?
The text was updated successfully, but these errors were encountered: