PHP Fatal error: Uncaught Swoole\Error: Socket#15 has already been bound to another coroutine#135, reading of the same socket in coroutine#136 at the same time is not allowed in /www/wwwroot/xxxxx/vendor/topthink/framework/src/think/cache/driver/Redis.php:116
Stack trace:
#0 /www/wwwroot/xxxxx/vendor/topthink/framework/src/think/cache/driver/Redis.php(116): Redis->get()
#1 /www/wwwroot/xxxxx/vendor/topthink/framework/src/think/session/driver/Cache.php(38): think\cache\driver\Redis->get()
#2 /www/wwwroot/xxxxx/vendor/topthink/framework/src/think/session/Store.php(83): think\session\driver\Cache->read()
#3 /www/wwwroot/xxxxx/vendor/topthink/framework/src/think/Manager.php(174): think\session\Store->init()
#4 [internal function]: think\Manager->__call()
#5 /www/wwwroot/xxxxx/vendor/topthink/framework/src/think/Facade.php(96): call_user_func_array()
#6 /www/wwwroot/xxxxx/app/websocket/Handler.php(58): think\Facade::__callStati in /www/wwwroot/xxxxx/vendor/topthink/framework/src/think/cache/driver/Redis.php on line 116
报错如下:
我使用的是
Cache::store('redis')->handler()
来获取redis实例 查阅了一下swoole的文档,说要用连接池,但我已经开启了cache连接池,仍然出现该问题跟这个问题类似,只不过我的问题是redis https://github.com/top-think/think-swoole/issues/134