semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

fix: mysql connect no keep alive

Open Fushengliangnian opened this issue 2 years ago • 3 comments

No operation for a long time. mysql is invalid connection

Fushengliangnian avatar Jun 06 '23 10:06 Fushengliangnian

Hi @Fushengliangnian

Thank you for you PR!

I think Close should stop pinging database.

I will review it soon.

fiftin avatar Jul 03 '23 08:07 fiftin

Thank recover.

This question has been bothering me for a long time.

I hope you can let me know when the repair is finished.

My English is very poor, please forgive me if the expression is not accurate

Thanks a million!!!

Fushengliangnian avatar Jul 03 '23 09:07 Fushengliangnian

@Fushengliangnian @fiftin I think this isn't the best solution to the problem. A better one would be to review this: http://go-database-sql.org/connection-pool.html and see if we can allow for the MaxIdle connections to be configurable including timeout so that people can adjust this based on their MySQL server setup.

andreas-marschke avatar Feb 04 '24 16:02 andreas-marschke