You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys, since I imported laravel-s (an out-of-box swoole integration to laravel) to my project based on laravel 8.x, I've been hit by a big problem.
Laravel register DatabaseManager as a Singleton in Illuminate\Database\DatabaseServiceProvider.
$this->app->singleton('db', function ($app) {
returnnewDatabaseManager($app, $app['db.factory']);
});
All sql queries in my project now seems to be in a queue. One sql must wait until previous sql to be done. That was a disaster.
My poor knowledge reserve told me connection pool will be a good idea. But laravel'is singleton DatabaseManager stop me.Is there any idea to change DatabaseManager to use connection pool instead of connection cache?Or any other ideas?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys, since I imported laravel-s (an out-of-box swoole integration to laravel) to my project based on laravel 8.x, I've been hit by a big problem.
Laravel register DatabaseManager as a Singleton in Illuminate\Database\DatabaseServiceProvider.
All sql queries in my project now seems to be in a queue. One sql must wait until previous sql to be done. That was a disaster.
My poor knowledge reserve told me connection pool will be a good idea. But laravel'is singleton DatabaseManager stop me.Is there any idea to change DatabaseManager to use connection pool instead of connection cache?Or any other ideas?
Beta Was this translation helpful? Give feedback.
All reactions