Closed bykiss closed 4 years ago
maxConns
或者maxSpareConns
必须要大于worker_num
因为worker_num
默认为swoole_cpu_num()
,你的cpu为16核,所以maxConns
和maxSpareConns
必须要大于16,所以设置为10 或swoole_cpu_num()/2
会出现该错误[warning] Invalid maxSpareConns or maxConns in XXX
该错误。
thx
Describe Your Environment (描述你的环境)
How to Reproduce the Problem? (如何重现问题)
Expected Behavior (预期行为)
能正常启动
Actual Behavior (实际行为)
启动失败,日志显示 [warning] Invalid maxSpareConns or maxConns in writeSΜvulscan (phar:///usr/local/smproxy/SMProxy/src/MysqlPool/MySQLPool.php:63)
More Information (更多信息)
CPU为16核 当改回 swoole_cpu_num() 时,且只能为swoole_cpu_num() ,启动成功 ...