Giter Site home page Giter Site logo

think-swoole's People

Contributors

shuipf avatar

Watchers

 avatar  avatar

think-swoole's Issues

默认开启了cache连接池,在websokcet的event handle中使用redis的时候仍然报错

我使用的是原版的think-swoole,由于学习资源较少,就来这里请教您了
报错如下:

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
top-think/think-swoole#134

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.