#2389·mysql

ECONNRESET: TCP KeepAlive issue

Author: bertho-zeroCreated Aug 12, 2020Updated Mar 14, 2022
Labelsfeature

I have an ECONNRESET problem every X minutes, by default node does not activate KeepAlive on the socket (https://nodejs.org/api/net.html#net_socket_setkeepalive_enable_initialdelay)

It is possible to pass an optional socket but a solution as proposed in https://github.com/mysqljs/mysql/pull/2110 seems more suitable.

I saw https://github.com/mysqljs/mysql/issues/566, https://github.com/mysqljs/mysql/issues/878 and https://github.com/mysqljs/mysql/issues/1939

What do you think is the approach to take?