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

Redis::CommandError: ERR max number of clients reached #1226

Closed
stabenfeldt opened this issue May 22, 2014 · 3 comments
Closed

Redis::CommandError: ERR max number of clients reached #1226

stabenfeldt opened this issue May 22, 2014 · 3 comments

Comments

@stabenfeldt
Copy link

I get this exception when I do Retry all.
I've searched for concurrency but could not find any information on how to get Resque to reduce the number of connections.
Is there a way I can tell Resque to only make 1 connection to the redis-server?
I only got 1 worker running.

Best,
Martin

@yaauie
Copy link
Member

yaauie commented May 22, 2014

Please report relevant version numbers when asking for help.

Resque doesn't do any connection pooling; it transparently uses a single redis connection via the redis gem.

Also, what is the value of the maxclients config on your redis instance? You can get this using the command-line client like so:

$ redis-cli -h your.redis.host.address -p 6379 config get maxclients
1) "maxclients"
2) "10000"

or in irb like so:

Redis.new(host: 'your.redis.host.address', port: 6379).config(:get, :maxclients)
# => {"maxclients"=>"10000"}

@stabenfeldt
Copy link
Author

I don't know why, but the redis server had several connections from 'dead' workers.
I fixed the problem by connecting to the redis server with redis-cli and killed all the clients there.

$ redis-cli 
> CLIENT LIST
> CLIENT KILL nn.nn.nn.nn:nnnnn

@coldfire-x
Copy link

this works for me

`$ redis-cli

CLIENT LIST
CLIENT KILL nn.nn.nn.nn:nnnnn`

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

No branches or pull requests

3 participants