louislivi / SMProxy

Swoole MySQL Proxy 一个基于 MySQL 协议,Swoole 开发的MySQL数据库连接池。 A MySQL database connection pool based on MySQL protocol and Swoole.
https://smproxy.louislivi.com
MIT License
1.78k stars 258 forks source link

php7.3 下 cpu一直很高 #80

Closed quqiufeng closed 3 years ago

quqiufeng commented 4 years ago

Describe Your Environment (描述你的环境)

cpu 一直100%

连接数配置为 swoole_cpu_num()*40

两个cpu 一直100%

quqiufeng commented 4 years ago
"serverInfo": {
  "": {
    "write": {
      "host": [""],
      "port": 3306,
      "timeout": 5,
      "account": ""
    },
    "read": {
      "host": [""],
      "port": 3306,
      "timeout": 5,
      "account": "",
      "startConns": "swoole_cpu_num()*40",
      "maxSpareConns": "swoole_cpu_num()*40",
      "maxSpareExp": 3600,
      "maxConns": "swoole_cpu_num()*40"
    }
  }
},
"databases": {
  "": {
    "serverInfo": "",
    "startConns": "swoole_cpu_num()*40",
    "maxSpareConns": "swoole_cpu_num()*40",
    "maxSpareExp": 3600,
    "maxConns": "swoole_cpu_num()*40",
    "charset": "utf8mb4"
  }
}

}

quqiufeng commented 4 years ago

升级到 swoole 4.5.3 后 启动报错 WARNING swTableColumn_add: unkown column type

louislivi commented 3 years ago

连接数不建议设置过大

quqiufeng commented 3 years ago

连接数不建议设置过大 升级到 swoole 4.5.3 后 启动报错 WARNING swTableColumn_add: unkown column type

chunpat commented 3 years ago

连接数不建议设置过大

一个连接占用多少资源?cpu飙高是什么原因?