[FireDAC][Phys][MySQL] MySQL server has gone away

[FireDAC][Phys][MySQL]  MySQL server has gone away

reason:

MYSQL and other databases are essentially SOCKET servers.

As a network communication server, there is a mechanism - it will regularly kick off SOCKET client connections that have been inactive for a long time, and regularly kick off zombie connections, which is beneficial to the server to maintain stable and efficient services.

ORACLE, MYSQL, MSSQL. . . Other long-connected SOCKET servers have such a mechanism, which is a common practice.

MySQL server has gone away - tell the client that I (MYSQL database) have kicked you out.

Solution:

1) Set on the MYSQL database side, and set this time to allow "Zhanda Maokeng not to pull Xiang" to a longer time.

2) In the connection pool of the database middleware, the connection exceeding the specified time will be automatically reconnected to the database.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325064102&siteId=291194637