Connection to the database
Hello! There is a problem. Terminates connection to the database over time. What could be the reason?

File server.php

``` php
<?php
require __DIR__ . '/../vendor/autoload.php';
use Chat\Chat;
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
use React\EventLoop\LoopInterface;
use React\EventLoop\Factory as LoopFactory;
 use React\Socket\Server as Reactor;
$loop = LoopFactory::create();
$socket = new Reactor($loop);
$socket->listen(8991,'****');

$server = new IoServer(new HttpServer(new WsServer(new Chat($loop))), $socket, $loop);
$server->run();
?>
```
