Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 25 07:13
    laijianbo commented #89
  • May 20 08:14
    wuxuejian opened #89
  • May 13 01:44
    daleWzd commented #29
  • May 13 01:43
    daleWzd reopened #88
  • May 13 01:42
    daleWzd closed #88
  • May 13 01:42
    daleWzd edited #88
  • May 13 01:41
    daleWzd opened #88
  • Apr 16 02:19
    BinZhiZhu opened #87
  • Feb 17 12:31
    louislivi commented #86
  • Feb 17 12:31
    louislivi commented #86
  • Feb 05 09:33
    simpleKalvin commented #86
  • Jan 21 06:11
    quqiufeng closed #80
  • Jan 13 13:21
    chunpat commented #80
  • Jan 07 08:09
    waming opened #86
  • Dec 25 2020 08:55
    louislivi closed #74
  • Dec 25 2020 08:40
    louislivi closed #85
  • Dec 25 2020 08:40
    louislivi commented #85
  • Dec 25 2020 08:14
    louislivi closed #81
  • Dec 25 2020 07:39
    louislivi closed #82
  • Dec 25 2020 07:39
    louislivi closed #83
louislivi
@louislivi
可以在这里发言哦~
louislivi
@louislivi
Can speak here~
louislivi
@louislivi
  /$$$$$$  /$$      /$$ /$$$$$$$                                        
 /$$__  $$| $$$    /$$$| $$__  $$                                       
| $$  \__/| $$$$  /$$$$| $$  \ $$ /$$$$$$   /$$$$$$  /$$   /$$ /$$   /$$
|  $$$$$$ | $$ $$/$$ $$| $$$$$$$//$$__  $$ /$$__  $$|  $$ /$$/| $$  | $$
 \____  $$| $$  $$$| $$| $$____/| $$  \__/| $$  \ $$ \  $$$$/ | $$  | $$
 /$$  \ $$| $$\  $ | $$| $$     | $$      | $$  | $$  >$$  $$ | $$  | $$
|  $$$$$$/| $$ \/  | $$| $$     | $$      |  $$$$$$/ /$$/\  $$|  $$$$$$$
 \______/ |__/     |__/|__/     |__/       \______/ |__/  \__/ \____  $$
                                                               /$$  | $$
                                                              |  $$$$$$/
                                                               \______/

SMProxy

一个基于 MySQL 协议,Swoole 开发的MySQL数据库连接池。
  • 支持读写分离
  • 支持数据库连接池,能够有效解决 PHP 带来的数据库连接瓶颈
  • 支持 SQL92 标准
  • 采用协程调度
  • 支持多个数据库连接,多个数据库,多个用户,灵活搭配
  • 遵守 MySQL 原生协议,跨语言,跨平台的通用中间件代理
  • 支持 MySQL 事务
  • 支持 HandshakeV10 协议版本
  • 完美兼容 MySQL4.1 - 8.0
  • 兼容各大框架,无缝提升性能
galen-bin
@galen-bin
怎么安装呢
louislivi
@louislivi
解压,配好配置,执行SMProxy文件
lifengjacky
@lifengjacky
000
Foolgry
@foolgry
test
lijiping126
@lijiping126
demo
@galen-bin hi
xiaolong
@luanjinlong
The requested PHP extension ext-swoole ^2.1.3||^4.3 is missing from your system. Install or enable PHP's swoole extension. 这个报错不知道怎么处理
我已经安装了 swoole PHP 的扩展也正常
Arif Majid
@binaryelites
PHP Fatal error: Uncaught RuntimeException: Cannot find config dir. in /home/shahid/swoole/SMProxy/src/Helper/functions.php:106
louislivi
@louislivi
@binaryelites The config directory should be located in the SMProxy directory.
Arif Majid
@binaryelites
Do we have any oracle library for this?
louislivi
@louislivi
Not yet.
Arif Majid
@binaryelites
any plans for the oracle extension?
Arif Majid
@binaryelites
@louislivi SMPROXY@ Reach max connections! Cann't pending fetch!
should the maxConns be always be a multiple of num of cpus available?
around 5-10k queries are executed per second here
Mr.lu
@imisy
哎 这个不错哦
louislivi
@louislivi
@binaryelites No plan for the time being,you are right ,Reach max connections question to see
Arif Majid
@binaryelites
@louislivi recommended timeout is 2-5 seconds. should we increase it to 10 seconds? will it cause any issue? As i am facing this issue frequently now.
louislivi
@louislivi
@binaryelites 10 seconds is OK. I suggest you increase maxConns.
Aslam Shahid
@ashahid007
Hello. Few of my connections are never used even i see Reach max Connection Pending Fetch. Why this happens. How i can enable logs or Fix it.
Also, what is benefit of using multiple workers. CPU or Concurrency etc.
louislivi
@louislivi
Maybe your connection will not be released, it will also cause the problem.
Explanation of workers https://www.swoole.co.uk/docs/modules/swoole-server/configuration
锅锅锅de1T
@xiaoguo0426
请问SMProxy与mysql自身的连接池两者有什么区别呢?或者SMProxy有哪些优势?
miaotaizi
@miaotaizi
这个扩展是不能跟 xdebug 一起运行吗
louislivi
@louislivi
@miaotaizi 是的,不能一起运行。
@xiaoguo0426 你说所说的mysql自身的连接池 具体是指什么,mysql 自身并没有连接池。
lisgroup
@lisgroup
"startConns": "swoole_cpu_num()*10", 导致连接池超过 MySQL 最大连接数,一直启动不了,后来看日志才发现问题。小坑,建议默认值小一点。
lxge
@lxge
请问我用mysqli来试的时候.为什么速度比原生的要慢啊,用的mysql5.5 swoole4.4 smproxy1.2.9
spring@abc
@SpringsOfReality
我用的tp5.0 ,测试的结果使用比不使用慢3倍 mysql5.7 swoole4.4 tp5.0 php 7.2
louislivi
@louislivi
@SpringsOfReality 不会慢这么多的,检查环境等因素。 @lxge
代理连接池在并发量不大的情况下会比直连mysql慢是正常的,毕竟多了代理层 ,代理连接池主要是降低数据库连接数 ,解决php并发高后出现的数据库连接打满 数据库崩溃等问题。 一般情况下会是直连的80%性能,会随着并发量降低差距。
renf
@renf
连接池
Jake Pucan
@ljfreelancer88
Hi, how can use
How can I use in Yii2 framework? It says in the documentation "(Recommended) Directly download PHAR in latest release" but I see no PHAR.
louislivi
@louislivi
@ljfreelancer88 Download the first two files.
for example smproxy v1.3.1
许涛
@xutao123777

SMProxy version: v1.3.1

Server starting ...
PHP Fatal error: Swoole\Server\Port::set(): option [package_length_func] does not support with ZTS in phar:///data/smproxy/SMProxy/src/BaseServer.php on line 62
这该怎么解决 ./SMProxy start
$this->server->set(packageLengthSetting());

hjy2588818
@hjy2588818
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 134217736 bytes) in phar:///data/wwwroot/SMProxy/SMProxy/src/Helper/functions.php on line 27
daleWzd
@daleWzd
请问是否支持 swoole4.5+ 的版本呢?
fdmadong
@fdmadong
smproxy配置两个数据库账户,两个数据库时,server.json里的root账户只能查看第一个数据库账户对应的数据库?这个怎么解决?