ezmobius/redis-rb — Issue #177:  Resource temporarily unavailable - Timeout reading from the socket (Errno::EAGAIN)
Author: Zhengquan
Created: 2012-02-03 04:01:09+00:00
State: open

My Gemfile:

gem 'rails', '3.1.1'
gem 'resque', :require => 'resque/server'
gem 'hiredis'
gem 'redis', :require => ["redis/connection/hiredis", "redis"]

I using [daemon-spawn](https://github.com/alexvollmer/daemon-spawn) to start and stop the resque worker, It seems work fine, But the reque worker may sometimes exit with the error below uninterruptedly.(my redis server is running with a timeout `300`.)

/myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis/client.rb:170:in `rescue in read': Resource temporarily unavailable - Timeout reading from the socket (Errno::EAGAIN)
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis/client.rb:161:in `read'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis/client.rb:46:in `block in call'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis/client.rb:142:in `block (2 levels) in process'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis/client.rb:250:in `ensure_connected'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis/client.rb:137:in `block in process'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis/client.rb:206:in `logging'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis/client.rb:136:in `process'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis/client.rb:46:in `call'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis.rb:414:in `block in lpop'
from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-2.2.2/lib/redis.rb:413:in `lpop'
from /myapp/shared/bundle/ruby/1.9.1/gems/redis-namespace-1.0.3/lib/redis/namespace.rb:213:in `method_missing'
from /myapp/shared/bundle/ruby/1.9.1/gems/resque-1.19.0/lib/resque.rb:158:in `pop'
from /myapp/shared/bundle/ruby/1.9.1/gems/resque-1.19.0/lib/resque/job.rb:97:in `reserve'
from /myapp/shared/bundle/ruby/1.9.1/gems/resque-1.19.0/lib/resque/worker.rb:184:in `block in reserve'
from /myapp/shared/bundle/ruby/1.9.1/gems/resque-1.19.0/lib/resque/worker.rb:182:in `each'
from /myapp/shared/bundle/ruby/1.9.1/gems/resque-1.19.0/lib/resque/worker.rb:182:in `reserve'
from /myapp/shared/bundle/ruby/1.9.1/gems/resque-1.19.0/lib/resque/worker.rb:119:in `block in work'
from /myapp/shared/bundle/ruby/1.9.1/gems/resque-1.19.0/lib/resque/worker.rb:116:in `loop'
from /myapp/shared/bundle/ruby/1.9.1/gems/resque-1.19.0/lib/resque/worker.rb:116:in `work'
from script/resque:13:in `start'
from /myapp/shared/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:51:in `block in start'
from /myapp/shared/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:38:in `fork'
from /myapp/shared/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:38:in `start'
from /myapp/shared/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:181:in `block in start'
from /myapp/shared/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:181:in `map'
from /myapp/shared/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:181:in `start'
from /myapp/shared/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:165:in `spawn!'
from script/resque:25:in `

'

How can I solve the problem?