swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 786 forks source link

2.0 数据库连接池maxIdleTime参数无效 #661

Closed yzrzr closed 5 years ago

yzrzr commented 5 years ago
Q A
Bug report? yes/no
Feature request? yes/no
Swoft version 2.0
Swoole version 4.2
PHP version 7.2
Runtime environment Mac

Details

连接池配置了maxIdleTime参数,但是到时间并不会释放连接

'db.pool' => [
        'class'       => \Swoft\Db\Pool::class,
        'database'    => \bean('db'),
        'minActive'   => 1, 
        'maxActive'   => 2, 
        'maxWait'     => 1000,
        'maxWaitTime' => 10,
        'maxIdleTime' => 60, 
    ],

![Uploading image.png…]()

stelin commented 5 years ago

感谢反馈问题,我们及时修复!

stelin commented 5 years ago

这个问题已经修复了,https://github.com/swoft-cloud/swoft-component/pull/418/commits/0e055913c66744b59c06a461b3f5db2ae87993ba

下个版本里面,就这一两天发版本

stelin commented 5 years ago

@yangjianfeng9527 2.0.1 已修复