«

hyperf mysql数据库连接数公式

时间:2024-8-10 16:38     作者:xiang     分类:


MySQL_connections = (worker_nums + task_worker_nums + custom process nums) * pool.max_connections

http服务worker_nums数量

自定义进程数量

task_worker_nums数量加起来的和乘以 连接池最大连接数pool.max_connections

'pool' => [
            'min_connections' => 1,
            'max_connections' => 10,
            'connect_timeout' => 10.0,
            'wait_timeout' => 3.0,
            'heartbeat' => -1,
            'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60),
        ],