FredyH / MySQLOO

MySQLOO
GNU Lesser General Public License v2.1
138 stars 55 forks source link

setAutoReconnect doesn't always seem to work (Problem not solved) #110

Closed HavannaFR closed 2 years ago

HavannaFR commented 2 years ago

Hi,

As you asked me to do if the problem was not solved, I would like to point out that your last fix does not correct the problem of auto disconnection, sorry I could not let you know before I forgot to check.

Original issue: https://github.com/FredyH/MySQLOO/issues/109

Thank you.

FredyH commented 2 years ago

How is it not working? What error is returned?

HavannaFR commented 2 years ago

How is it not working? What error is returned?

Still the same error : The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.

FredyH commented 2 years ago

Could you send me the setting for the wait_timeout you have in your mysql server's config? Or is it hosted by someone else? If so, you can retrieve the value using

SHOW GLOBAL VARIABLES LIKE "wait_timeout";
HavannaFR commented 2 years ago

Could you send me the setting for the wait_timeout you have in your mysql server's config? Or is it hosted by someone else? If so, you can retrieve the value using

SHOW GLOBAL VARIABLES LIKE "wait_timeout";

here is what i get when i run your query : wait_timeout 28800

FredyH commented 2 years ago

I could not reproduce this issue locally. After setting wait_timeout to 10 seconds and running a query, it reconnected as expected. However, when I turn off reconnecting I get a different error than you: Lost connection to server during query I am running MariaDB, which database version are you running?

HavannaFR commented 2 years ago

I could not reproduce this issue locally. After setting wait_timeout to 10 seconds and running a query, it reconnected as expected. However, when I turn off reconnecting I get a different error than you: Lost connection to server during query I am running MariaDB, which database version are you running?

thank you for your reply, it's weird, personally I use MySQL

FredyH commented 2 years ago

Apparently MySQL introduced a different error for when wait_timeout is exceeded in version 8.0.24, so the auto-reconnect mechanism did not catch it. I added support for it and published a new release.