Closed C0casio45 closed 2 years ago
MySQL does remove unused connections. The default timeout is 8 hours. Use show variables like 'wait_timeout';
to view current timeout settings, and try edit to set wait_timeout=31536000;
365 day / 1 year.
Thanks a lot, I'll wheck this right now and if it's work I will close this issue
Ok so it works but set wait_timeout is great on session only If you want to set wait_timeout globally, you need to go in /etc/mysql and add the following lines
[mysqld]
wait_timeout=31536000
interactive_timeout =31536000
Details
I'm running a bot and I'm getting this error from 1 to two times a day
Node.js version
16.6.1
Example code
I have no idea where it comes from https://github.com/C0casio45/bot_onet
Operating system
debian
Scope
runtime (prod)
Module and version
mysql or discordjs