redis - Heroku 崩溃(似乎是 Sidekiq/Redis )

标签 redis ruby-on-rails-5 sidekiq

在 Heroku 上启动应用程序时出现以下问题:

2018-02-20T23:55:19.456182+00:00 heroku[worker.1]: Starting process with command `bundle exec sidekiq -e production -C config/sidekiq.yml`
2018-02-20T23:55:20.180974+00:00 heroku[worker.1]: State changed from starting to up
2018-02-20T23:55:23.590432+00:00 app[worker.1]: 4 TID-78no8 INFO: Booting Sidekiq 4.2.10 with redis options {:url=>"redis://h:REDACTED@ec2-34-252-234-97.eu-west-1.compute
.amazonaws.com:27639"}
2018-02-20T23:55:24.455410+00:00 heroku[worker.1]: Process exited with status 1
2018-02-20T23:55:24.466303+00:00 heroku[worker.1]: State changed from up to crashed
2018-02-20T23:55:24.271262+00:00 app[worker.1]: I, [2018-02-20T23:55:24.271106 #4]  INFO -- : DB Connection Pool size for Sidekiq Server before disconnect is: 1
2018-02-20T23:55:24.274465+00:00 app[worker.1]: could not connect to server: No such file or directory
2018-02-20T23:55:24.274469+00:00 app[worker.1]:         Is the server running locally and accepting
2018-02-20T23:55:24.274471+00:00 app[worker.1]:         connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

貌似是redis的问题,但是想不通是哪里出了问题。

sidekiq.yml

development:
  :concurrency: 5
production:
  :concurrency: 20
:queues:
  - default
  - mailers

配置文件

web: bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq -e production -C config/sidekiq.yml

配置变量

REDIS_URL   redis://h:pe........stuff.here..........9fa3@ec2-34-252-234-97.eu-west-1.compute.amazonaws.com:27639

Redis.rb

$redis = Redis.new(url: ENV["REDIS_URL"])

最佳答案

仔细阅读错误:

Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

您的数据库配置错误。

关于redis - Heroku 崩溃(似乎是 Sidekiq/Redis ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48896305/

相关文章:

缓存数据库问题

ruby-on-rails - ActiveSupport::MessageVerifier::InvalidSignature: ActiveSupport::MessageVerifier::InvalidSignature 错误在 rails 5

ruby - 当用户返回表单以更正错误时,如何防止浏览器栏中的 URL 发生更改?

ruby-on-rails - Rails中Redis队列处理异步任务

redis - 获取入队时间超过 5 分钟的 redis-Key 数量

python - redis:设置是否存在 - 通过 python

node.js - NodeJS 和 Redis : getting three values simultaneously

ruby-on-rails-5 - gem 在 Rails 上 react : webpack. config.js

ruby-on-rails - 在 Rails begin-end block 中启动异步进程会导致问题吗?

Redis 用于 session 存储