Tôi đã thiết lập công nhân của mình và họ đã thực thi mà không gặp vấn đề gì (đang phát triển) nhưng bây giờ họ không sản xuất hoặc phát triển (tôi đoán sau khi thay đổi từ SQlite3 sang PostgreSQL).Nhân viên phục hồi không hoạt động với máy chủ PostgreSQL
Khi tôi chạy một lệnh cào để chạy các công nhân với rake resque:work QUEUE=*
tôi nhận được lỗi và vết đống sau:
getaddrinfo: nodename nor servname provided, or not known
tôi nhận được lỗi sau khi chạy heroku rake resque:work QUEUE=*
trong giao diện điều khiển để kiểm tra công nhân đang chờ xử lý hàng đợi .
Class SentimentJob
Arguments [4, 5, 6]
Exception ActiveRecord::StatementInvalid
Error PGError: server closed the connection unexpectedly This probably means
the server terminated abnormally before or while processing the request.
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid =
d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"taggings"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum
Và đối với người lao động Facebook của tôi:
Class FBConnectionsJob
Arguments 1
Exception OpenSSL::SSL::SSLError
Error SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
certificate verify failed
Class FBConnectionsJob
Arguments 1
Exception ActiveRecord::StatementInvalid
Error PGError: server closed the connection unexpectedly This probably means
the server terminated abnormally before or while processing the request.
: SELECT tablename FROM pg_tables WHERE schemaname = ANY
(current_schemas(false))
Tại sao tôi nhận lỗi khác nhau trong các môi trường khác nhau? Tệp khởi tạo của tôi trông giống như:
Tôi có nên thêm thông số ENV ở đây không?
Resque.rb
uri = URI.parse(ENV["REDISTOGO_URL"])
Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
Dir["#{Rails.root}/app/jobs/*.rb"].each { |file| require file }
Redis.rb
uri = URI.parse(ENV["REDISTOGO_URL"])
REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
Resque.redis = REDIS
My môi trường/production.rb tập tin không có tham chiếu đến Redis và môi trường của tôi/phát triển. rb tệp này có cài đặt Redis:
ENV["REDISTOGO_URL"] = 'redis://username:[email protected]:6789'
Đối với tôi, có vẻ như vấn đề này giống với kết nối cơ sở dữ liệu hơn là Redis. Bạn đang sử dụng một số loại thiết lập không chuẩn? –
Đã đọc sách, hey. – Simpleton