Mysql – (Got an error reading communication packets) but no error on client

azuremariadbMySQL

i've search a lot about this thread without results.
we don't know how to resolve this:
DB : mariaDB
SERVER: Microsoft Azure
enviroment: Nodejs with Knex (pool connections, min 0 max 300)

our client app stop to catch db response, without an error, except for (Got an error reading communication packets)

if we try to connect to mysql through Navicat/TablePlus/MysqlWorkbench (or even our app in local) during the error we still receive the data from db.
we don't know how to resolve it, since wednesday.

any idea about it?

Best Answer

Try to increase your connection pool min size 5 instead of 0.

From DB side, verify the timeout variables and connection pool variables like

wait_timeout & interactive_timeout >=  app connection pool timeouts.  (db timeouts should not be less than app timeouts).    And check to make sure the value of max_allowed_packet is high enough. Lastly increase enough net_read and net_write timeouts from DB side.