D
D
ddddd tttt2018-06-19 11:10:59
Yii
ddddd tttt, 2018-06-19 11:10:59

How to maintain a persistent connection with MySQL?

I am using the Ratchet chat library. Works like a demon. I start through the console controller. The problem is that over time, the connection to the database breaks and the app also crashes. How to maintain a connection in a daemon all the time.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2018-06-19
@kawabanga

I have before the start of the socket is -
And in the settings of the bd component is -

'attributes'=>[
        PDO::ATTR_PERSISTENT => true
    ]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question