-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #687 from 37signals/retry_reconnection
Worker tries to reconnect to Redis up to 3 times with increasing delay before giving up
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d39046f
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.
It looks like this is in the changelog and should be in the 1.23 release, but I'm not seeing this behavior at at locally.
If I manually fire up a worker using rake resque:work, then kill/restart my local redis-server, I get an immediate exception about ECONNREFUSED an the worker dies. I see no output related to "Error reconnecting to Redis; retrying".
*** Starting worker hank:5211:cache
'*** Error reserving job: #<Redis::CannotConnectError: Error connecting to Redis on localhost:6379 (ECONNREFUSED)>
*** /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis/client.rb:268:in
rescue in establish_connection' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis/client.rb:263:in
establish_connection'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis/client.rb:69:in
connect' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis/client.rb:282:in
ensure_connected'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis/client.rb:173:in
block in process' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis/client.rb:248:in
logging'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis/client.rb:172:in
process' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis/client.rb:84:in
call'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis.rb:899:in
block in lpop' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis.rb:36:in
block in synchronize'/Users/claco/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis.rb:36:in
synchronize'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-3.0.2/lib/redis.rb:898:in
lpop' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/redis-namespace-1.2.1/lib/redis/namespace.rb:257:in
method_missing'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque.rb:149:in
pop' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque/job.rb:100:in
reserve'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque.rb:303:in
reserve' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque/worker.rb:209:in
block in reserve'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque/worker.rb:207:in
each' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque/worker.rb:207:in
reserve'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque/worker.rb:136:in
block in work' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque/worker.rb:133:in
loop'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque/worker.rb:133:in
work' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/resque-1.23.0/lib/resque/tasks.rb:36:in
block (2 levels) in <top (required)>'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/task.rb:205:in
call' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/task.rb:205:in
block in execute'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/task.rb:200:in
each' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/task.rb:200:in
execute'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/task.rb:158:in
block in invoke_with_call_chain' /Users/claco/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/task.rb:151:in
invoke_with_call_chain' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/task.rb:144:in
invoke'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/application.rb:112:in
invoke_task' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/application.rb:90:in
block (2 levels) in top_level'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/application.rb:90:in
each' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/application.rb:90:in
block in top_level'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/application.rb:129:in
standard_exception_handling' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/application.rb:84:in
top_level'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/application.rb:62:in
block in run' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/application.rb:129:in
standard_exception_handling'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/lib/rake/application.rb:59:in
run' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/gems/rake-0.9.2/bin/rake:32:in
<top (required)>'/Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/bin/rake:19:in
load' /Users/claco/.rvm/gems/ruby-1.9.3-p286@w3/bin/rake:19:in
rake aborted!
Error connecting to Redis on localhost:6379 (ECONNREFUSED)
d39046f
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.
Can you file an Issue, please? and cc @trevorturk
d39046f
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.
Done. https://github.com/defunkt/resque/issues/737