Browse Source

Increase the connection pool size. (#8532)

MARiA so cute 1 year ago
parent
commit
8832674a83
1 changed files with 1 additions and 1 deletions
  1. 1 1
      frameworks/PHP/swoole/database.php

+ 1 - 1
frameworks/PHP/swoole/database.php

@@ -133,7 +133,7 @@ class Connections
             ->withUsername('benchmarkdbuser')
             ->withUsername('benchmarkdbuser')
             ->withPassword('benchmarkdbpass');
             ->withPassword('benchmarkdbpass');
 
 
-        self::$pool = new PDOPool($config, 20);
+        self::$pool = new PDOPool($config, intval(1024 / swoole_cpu_num()));
     }
     }
 
 
     public static function db(): string
     public static function db(): string