Comments (4)
That's strange. I just tested this locally by creating 50
RedisFailover::Client instances in irb, and then closing the irb session.
There was no hanging at all. The RedisFailover::Client does provide a
#shutdown method which will gracefully shutdown the client (and the
underlying ZK connection) which you can try invoking, but it really
shouldn't be necessary.
@slyphon, do you notice anything obvious in the gist that's linked here?
The thread dump points to something in the threadpool.rb of the ZK gem.
I also noticed that you're using ZK 1.7. I have redis_failover locked down
to ~1.6. I haven't tested redis_failover with ZK 1.7 yet.
On Fri, Oct 5, 2012 at 1:54 PM, Max Justus Spransy <[email protected]
wrote:
Here's another one for ya :)
Today we started noticing that Rake tasks were hanging after completion.
We did a thread dump on one that was hung and saw this:
https://gist.github.com/b3852a8ea44cc1cf36e1The code that ended up fixing it was changing this:
https://gist.github.com/95316d829d24627b6937
to this:
https://gist.github.com/9d70da788596c8192572For Sidekiq server instances we are still using a connection pool of
worker_thread_count + 2 and haven't seen this same issue. I did notice
though on occasion that when closing a rails console with allot of open
redis failover client connections open it'll hang. Perhaps it relates to
connection cleanup?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/38.
from redis_failover.
This is the same issues as I reported here: zk-ruby/zk#50
The workaround I've successfully been using:
at_exit do
$redis.shutdown
end
from redis_failover.
Thanks, @tsilen.
Yes, that's a good approach. You can use the RedisFailover::Client#shutdown
method in an #at_exit hook.
Ryan
On Mon, Oct 8, 2012 at 8:08 AM, tsilen [email protected] wrote:
This is the same issues as I reported here: zk-ruby/zk#50zk-ruby/zk#50
The workaround I've successfully been using:at_exit do
$redis.shutdown
end—
Reply to this email directly or view it on GitHubhttps://github.com//issues/38#issuecomment-9228841.
from redis_failover.
Root issue is logged here: zk-ruby/zk#50
According to that issue, it looks like a bug in the Ruby interpreter and how it handles ConditionVariable cleanup. For now, I would suggest upgrading to redis_failover 1.0 (to be released tomorrow) and use a single ZK client instance when you setup your Sidekiq threadpool, e.g.:
zk = ZK.new('localhost:2181,localhost:2182,localhost:2183')
cp = ConnectionPool.new(:size => 20) { RedisFailover::Client.new(:zk => zk) }
from redis_failover.
Related Issues (20)
- Full Failure of server HOT 1
- Undefined method 'job' for main object with Resque HOT 4
- Occasionally stale server selection HOT 2
- start-stop-daemon to start redis_failover how to save log
- Add informative procline
- passing in a zk and having it close before redis-failover can trigger an infinite loop
- Prevent reads on slaves HOT 3
- Add subscribing part of Pub/Sub ops to REDIS_READ_OPS
- If ZK has an old master, redis_failover will use it even though the redis instance does not exist HOT 2
- License missing from gemspec
- stuck in "Failed to discover master node" HOT 1
- Shutdown fails with Ruby 2.0 HOT 3
- Error bringing back up failed master HOT 8
- Support Ruby 2.0 HOT 2
- Support Redis 2.8 HOT 1
- Allow Manual Failover in cluster bootstrap
- Redis-failover start up error HOT 1
- Starting redis_node_manager connection timeouts HOT 3
- State of redis_failover HOT 3
- ruby1.9 下启动报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis_failover.