laravel5.8使用redis集群queue报错
环境:
腾讯云买的redis集群
暴漏了一个ip和一个端口,我使用了默认的redis配置:
项目里装了laravel/horizon,laravel版本5.8
在用redis异步队列的时候其中一个报错:
CROSSSLOT Keys in request don’t hash to the same slot
报错的对象:
object(Illuminate\Foundation\Bus\PendingDispatch)#928 (1) {
["job":protected]=>
object(App\Jobs\SendCode)#24 (8) {
["data":protected]=>
array(3) {
["content"]=>
string(4) "aaaa"
["contact"]=>
string(18) "1234@qq.com"
["type"]=>
string(5) "email"
}
["job":protected]=>
NULL
["connection"]=>
NULL
["queue"]=>
string(14) "reset_pwd_code"
["chainConnection"]=>
NULL
["chainQueue"]=>
NULL
["delay"]=>
NULL
["chained"]=>
array(0) {
}
}
}
而另外一个正常:
object(Illuminate\Foundation\Bus\PendingDispatch)#928 (1) {
["job":protected]=>
object(App\Jobs\LoginLog)#24 (12) {
["user":protected]=>
array(2) {
["account_id"]=>
string(6) "qazwsx"
["workcode"]=>
string(3) "123"
}
["plat":protected]=>
string(3) "web"
["ip":protected]=>
string(7) "0.0.0.0"
["appid":protected]=>
string(6) "123456"
["login_time":protected]=>
string(19) "2020-09-18 17:34:55"
["job":protected]=>
NULL
["connection"]=>
NULL
["queue"]=>
NULL
["chainConnection"]=>
NULL
["chainQueue"]=>
NULL
["delay"]=>
NULL
["chained"]=>
array(0) {
}
}
}