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

不支持新版的swoole吗 swoole4.5+? #95

Open shuqingzai opened 3 years ago

shuqingzai commented 3 years ago

Describe Your Environment (描述你的环境)

How to Reproduce the Problem? (如何重现问题)

  1. 使用新版本的swoole,弃用了一些函数,进程重启后无法运行
  2. 使用laravel8.5连接的SMProxy

Expected Behavior (预期行为)

希望支持4.5+的swoole

Actual Behavior (实际行为)

不支持4.5+swoole,但是版本描述中是支持4.0+

More Information (更多信息)

错误信息:

system.log

2021-10-08 03:46:42 [error] Swoole\Event::rshutdown(): Event::wait() in shutdown function is deprecated (Unknown:0) 2021-10-08 03:49:00 [error] Swoole\Event::rshutdown(): Event::wait() in shutdown function is deprecated (Unknown:0) 2021-10-08 03:55:05 [error] Swoole\Event::rshutdown(): Event::wait() in shutdown function is deprecated (Unknown:0) 2021-10-08 03:57:13 [error] Swoole\Event::rshutdown(): Event::wait() in shutdown function is deprecated (Unknown:0) 2021-10-08 03:58:10 [error] Swoole\Event::rshutdown(): Event::wait() in shutdown function is deprecated (Unknown:0) 2021-10-08 04:02:21 [error] Swoole\Event::rshutdown(): Event::wait() in shutdown function is deprecated (Unknown:0)

swoole.log

[Coroutine-19]

0 Swoole\Coroutine\Client->recv() called at [phar:///Users/caizhiyuan/code/php/smproxy 2/SMProxy/src/MysqlProxy.php:263]

1 SMProxy\MysqlProxy->recv() called at [phar:///Users/caizhiyuan/code/php/smproxy 2/SMProxy/src/MysqlProxy.php:90]

2 SMProxy\MysqlProxy->SMProxy{closure}() called at [phar:///Users/caizhiyuan/code/php/smproxy 2/SMProxy/src/Base.php:35]

[2021-10-08 12:09:11 *91534.5] WARNING Worker_reactor_try_to_exit() (ERRNO 9012): worker exit timeout, forced termination

=================================================================== [FATAL ERROR]: all coroutines (count: 2) are asleep - deadlock!

[Coroutine-19]

0 Swoole\Coroutine\Client->recv() called at [phar:///Users/caizhiyuan/code/php/smproxy 2/SMProxy/src/MysqlProxy.php:263]

1 SMProxy\MysqlProxy->recv() called at [phar:///Users/caizhiyuan/code/php/smproxy 2/SMProxy/src/MysqlProxy.php:90]

2 SMProxy\MysqlProxy->SMProxy{closure}() called at [phar:///Users/caizhiyuan/code/php/smproxy 2/SMProxy/src/Base.php:35]

twose commented 3 years ago

这个是你自己程序的问题

  1. 用的时候代码没有包在co\run里
  2. 用完以后没有释放连接池设施
shuqingzai commented 2 years ago

这是直接下载 SMProxy 运行的,@twose 你说的两个问题不应该是 SMProxy 处理好的吗?我本地laravel连接 SMProxy,两个项目都是全新安装的

iMactool commented 2 years ago

今天刚好在安装测试

image

swoole: 4.8.7

php : 8.0.1

SMProxy :[v1.3.1]

yii2 测试没有问题