-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
"SocketError - getaddrinfo: Name or service not known" on production #619
Comments
I'd be interested to see your redis/resque initializer. |
Here you go: $redis = Redis.new(:host => 'localhost', :port => 6379) Resque require 'resque'
require 'resque_scheduler'
config = YAML.load_file(Rails.root.join('config', 'resque.yml'))
cron = YAML.load_file(Rails.root.join('config', 'cron.yml'))
# configure redis connection
Resque.redis = config[Rails.env]
# configure the schedule
Resque.schedule = cron
#patch for redis
require File.join(Rails.root, 'lib/resque_redis_fix.rb') |
It happened to me also for one application deployed on heroku but strange thing is that it works in another app, pretty much the same configs. What is your redis url from resque.yml file? I use something like this: redis://user:pass@pike.redistogo.com:9005. |
Oh God.. Just realized this file contained the following:
No wonder it worked in dev but not prod... I'll close the issue then, sorry for the bother. |
Hello,
I get the error in title on my production server. I've sourced it and it comes from Resque.redis in lib/resque.rb, and more precisely @redis. Somehow @redis doesn't get correctly initialized, so I've made that hacky patch:
And it works. Any opinion on this?
Cheers,
Ben
The text was updated successfully, but these errors were encountered: