我正在处理令人沮丧的错误 - 有时候sidekiq无法开始处理工作。这令人烦恼地断断续续。
当它发生时,sidekiq.log
显示没有变化(并且它正在运行)。队列大小保持为0.我猜它在Redis中迷失了。
如果重要的话,我有三个相同应用程序的环境在同一台机器上运行(不同的环境),我刚刚放入(但问题出现在它们之前)。只有一个Redis在默认端口上运行。
我知道redis-cli MONITOR
,但是它喷出的东西如此之快,而且有很多东西,我很难弄清楚发生了什么。
1491479154.190069 [0 127.0.0.1:38763] "brpop" "queue:default" "2"
1491479154.289507 [0 127.0.0.1:38753] "brpop" "queue:default" "2"
1491479154.289544 [0 127.0.0.1:38752] "brpop" "queue:default" "2"
/// snip... many lines of these
1491479154.364985 [0 127.0.0.1:38772] "multi"
1491479154.365090 [0 127.0.0.1:38772] "incrby" "stat:processed" "0"
1491479154.365107 [0 127.0.0.1:38772] "incrby" "stat:processed:2017-04-06" "0"
1491479154.365128 [0 127.0.0.1:38772] "incrby" "stat:failed" "0"
1491479154.365133 [0 127.0.0.1:38772] "incrby" "stat:failed:2017-04-06" "0"
1491479154.365139 [0 127.0.0.1:38772] "del" "server.name:32533:6befea0f66c0:workers"
1491479154.365149 [0 127.0.0.1:38772] "expire" "server.name:32533:6befea0f66c0:workers" "60"
1491479154.365160 [0 127.0.0.1:38772] "exec"
1491479154.365896 [0 127.0.0.1:38772] "multi"
1491479154.365962 [0 127.0.0.1:38772] "sadd" "processes" "server.name:32533:6befea0f66c0"
1491479154.365977 [0 127.0.0.1:38772] "exists" "server.name:32533:6befea0f66c0"
1491479154.365987 [0 127.0.0.1:38772] "hmset" "server.name:32533:6befea0f66c0" "info" "{\"hostname\":\"server.name\",\"started_at\":1491373877.8700902,\"pid\":2217,\"tag\":\"demo\",\"concurrency\":25,\"queues\":[\"default\"],\"labels\":[],\"identity\":\"server.name:32533:6befea0f66c0\"}" "busy" "0" "beat" "1491479154.3655496" "quiet" "false"
1491479154.366035 [0 127.0.0.1:38772] "expire" "server.name:32533:6befea0f66c0" "60"
1491479154.366046 [0 127.0.0.1:38772] "rpop" "server.name:32533:6befea0f66c0-signals"
1491479154.366058 [0 127.0.0.1:38772] "exec"
1491479154.389484 [0 127.0.0.1:38751] "brpop" "queue:default" "2"
如何调试Redis和Sidekiq来解决这个问题?我想用grep
进行管道,但我无法在redis-cli
交互式shell中进行管道...
想法?
答案 0 :(得分:0)
有两个不同环境正在运行的实例。一旦我删除了分期,生产工作就好了。我猜它没有正确设置。