Closed dahuicyh closed 5 years ago
You can change the driver to mysql-coroutine
in config/database.php
If you are using Lumen you should add LumenServiceProvider::class before $app->withEloquent()
@damonto I installed it by composer, so what should I do about it?
"swooletw/laravel-swoole": "^2.5",
now: https://github.com/swooletw/laravel-swoole/tree/develop not in composer
"swooletw/laravel-swoole" : "dev-develop". NOT RECOMMEND.
@damonto thank you very much
Now a new error: Symfony\Component\Debug\Exception\FatalErrorException: Uncaught ErrorException: Swoole\Coroutine\MySQL::prepare(): mysql client is waiting response, cannot send new sql query.
wait 1 min response
Hi @Leon-zzk ,
It doesn't support create another sub coroutine on your own at this moment.
Also, the coroutine feature is still in develop, it's not recommended to use coroutine client yet. Otherwise your some bindings in your app container will get polluted easily if you access them by Facades or static props.
Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks! (Any non-English issues will be closed immediately.)
Please provide your PHP and Swoole version. (
php -v
andphp --ri swoole
) PHP 7.2 swoole:4.0.4Please provide your Laravel/Lumen version. lumen:5.6
Which release version of this package are you using? 2.5
What did you do? If possible, provide a recipe for reproducing the error.
I want to use MySQL protocol, how to configure it!
This is my current configuration:(app.php)
$app->configure('swoole_http'); $app->configure('swoole_websocket');
$app->register(SwooleTW\Http\LumenServiceProvider::class);
The MySQL protocol has not been found to be in effect?