mordilion/doctrine-connection-keeper
最新稳定版本:v1.0.0
Composer 安装命令:
composer require mordilion/doctrine-connection-keeper
包简介
A library to keep the Doctrine DBAL connection alive
README 文档
README
Keep the connection to your MySQL-Server alive!
If an error happens like "MySQL server has gone away", then it will retry the failed statement. If the error happens again after the maximum retry attempts, then it throws it.
Config Example
use \Mordilion\DoctrineConnectionKeeper\Doctrine\DBAL\Connection; return [ 'doctrine' => [ 'connection' => [ 'orm_default' => [ 'wrapperClass' => Connection::class, 'params' => [ 'driver' => 'pdo_mysql', 'host' => 'localhost', 'port' => '3307', 'user' => '***', 'password' => '***', 'dbname' => '***', 'charset' => 'UTF8', 'connection_keeper' => [ // settings for the connection keeper 'reconnect_attempts' => 3, // how often should it try to reconnect? 'refresh_on_exception' => true, // should it refresh the connection on an exception? ], ], ], ], ], ];
统计信息
- 总下载量: 15.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-20