Will the tp5 integrated think-worker report an error after running for a period of time?

database

and sometimes there are cases of MySQL server has gone away. Trying to modify the max_allowed_packet, of my.cnf does not seem to work. How should these situations be solved?

Sep.08,2021

'params' => [
    \PDO::ATTR_PERSISTENT   => true,
    \PDO::ATTR_CASE         => \PDO::CASE_LOWER,
],
// 
'break_reconnect' => true,

the database is closed after use and reopened when you use it.


means that the database is broken. There should be something wrong with the reconnection code. Adjust the disconnection time of the database by yourself, and debug it to see what situation is not reconnected.

Menu