我在heroku上安装了一个rails应用程序并安装了redis。我发送联系人使用sidekiq。根据统计数据(localhost:3000 / sidekiq),邮件发送完成后,开发环境完美运行。在制作中,邮件被排队(在统计中可见),但从未被发送出去。 我检查了我的sidekick日志文件,其中写着:"' production'数据库未配置。可用:["默认","开发","测试"]"。
在配置方面,sidekiq网站说:" Sidekiq配置文件是Sidekiq服务器用来配置自身的YAML文件,默认情况下位于config / sidekiq.yml。 如果需要设置高级选项,例如并发池大小,命名队列,PID文件位置等,则只需要创建文件。"
我没有偏离基础(使用默认队列),所以根据这个我不应该创建配置文件。尽管如此,我看到了许多不同的解决方案,但我不知道如何使这项工作。
########从这里编辑我做了3次更改,出了点问题:
创建了config / init / redis.rb
$redis = Redis.new(url: ENV["REDIS_URL"])
创建了proc文件
web: bundle exec thin start -p
worker: bundle exec sidekiq -c 5 -v
并在命令行中:
$ REDIS_PROVIDER: REDISTOGO_URL
目前我在heroku日志中得到了这个:
2015-09-23T17:45:06+00:00 app[heroku-redis]: source=REDIS sample#active connections=1 sample#load-avg-1m=0.165 sample#load-avg-5m=0.16 sample#load-avg-15m=0.13 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405664kB sample#memory-free=13274380kB sample#memory-cached=495244kB sample#memory-redis=295456bytes
2015-09-23T17:46:24+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.115 sample#load-avg-5m=0.15 sample#load-avg-15m=0.125 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405664kB sample#memory-free=13274528kB sample#memory-cached=495244kB sample#memory-redis=295456bytes
2015-09-23T17:47:00.650410+00:00 heroku[web.1]: Idling
2015-09-23T17:47:00.651110+00:00 heroku[web.1]: State changed from up to down
2015-09-23T17:47:46.264012+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2015-09-23T17:47:46.264012+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2015-09-23T17:47:37+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.075 sample#load-avg-5m=0.13 sample#load-avg-15m=0.12 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405664kB sample#memory-free=13271788kB sample#memory-cached=495380kB sample#memory-redis=295456bytes
...
...
...
2015-09-23T18:14:24+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.095 sample#load-avg-5m=0.125 sample#load-avg-15m=0.12 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405664kB sample#memory-free=13272136kB sample#memory-cached=495440kB sample#memory-redis=295456bytes
2015-09-23T18:15:29.144536+00:00 heroku[api]: Release v37 created by szilard.magyar@gmail.com
2015-09-23T18:15:29.144419+00:00 heroku[api]: Deploy b0303dd by szilard.magyar@gmail.com
2015-09-23T18:15:29.212308+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-23T18:15:29.212337+00:00 heroku[slug-compiler]: Slug compilation finished
2015-09-23T18:15:20+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.095 sample#load-avg-5m=0.125 sample#load-avg-15m=0.12 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405664kB sample#memory-free=13272136kB sample#memory-cached=495440kB sample#memory-redis=295456bytes
2015-09-23T18:15:56.813737+00:00 heroku[web.1]: Unidling
2015-09-23T18:15:56.814701+00:00 heroku[web.1]: State changed from down to starting
2015-09-23T18:16:02.295335+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -p`
2015-09-23T18:16:04.220054+00:00 app[web.1]: Install missing gem executables with `bundle install`
2015-09-23T18:16:04.220024+00:00 app[web.1]: bundler: command not found: thin
2015-09-23T18:16:05.048801+00:00 heroku[web.1]: Process exited with status 127
2015-09-23T18:16:05.087911+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-23T18:16:05.088846+00:00 heroku[web.1]: State changed from crashed to starting
2015-09-23T18:16:12.443341+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -p`
2015-09-23T18:16:15.603477+00:00 app[web.1]: bundler: command not found: thin
2015-09-23T18:16:15.603501+00:00 app[web.1]: Install missing gem executables with `bundle install`
2015-09-23T18:16:16.582868+00:00 heroku[web.1]: Process exited with status 127
2015-09-23T18:16:16.594516+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-23T18:16:17.306558+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=appfaskyn.herokuapp.com request_id=a621bcd8-13b8-4bbe-a10b-d15dcda0f464 fwd="46.139.53.208" dyno= connect= service= status=503 bytes=
2015-09-23T18:16:17.309666+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=appfaskyn.herokuapp.com request_id=0b639f31-3c32-4d12-b871-245995c960cd fwd="46.139.53.208" dyno= connect= service= status=503 bytes=
我该怎么办?