Connection pool is used to reduce the TCP reconnect overhead, can be used to increase the application performance.
You can use the build-in MysqliPool to manage a pool of connection to database servers or remote services.
Edit: after a little observation, it seems that it defaults to using persistent connection (reusing same connection for each workers, the number of active connection in SHOW FULL PROCESSLIST equals to config.swoole_http.worker_num config), but does not support connection pool. I've also tried to add 'options' => [ \PDO::ATTR_PERSISTENT => true/false, ], in config/database.php inside connections item but it still persistent
This is question rather than issue/bug.
Does this support mysql persistent connection or mysql connection pooling?
https://openswoole.com/docs/modules/mysqli-connection-pool
Quoted from link above:
Edit: after a little observation, it seems that it defaults to using persistent connection (reusing same connection for each workers, the number of active connection in
SHOW FULL PROCESSLIST
equals toconfig.swoole_http.worker_num
config), but does not support connection pool. I've also tried to add'options' => [ \PDO::ATTR_PERSISTENT => true/false, ],
in config/database.php insideconnections
item but it still persistentObserved (cmiiw):