FredyH / MySQLOO

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

setAutoReconnect doesn't always seem to work #109

Closed HavannaFR closed 2 years ago

HavannaFR commented 2 years ago

Hi,

I currently have a problem that happens rarely but still happens from time to time and is particularly disturbing. I could see in my logs that some requests failed to execute and left an error in the console: [ULIB] Query ERROR: The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.

I did setAutoReconnect(true) before the connect()

Do you think there is a problem with the setAutoReconnect() function?

Thank you.

FredyH commented 2 years ago

Sorry for the late reply. I have tested the issue and it does appear to be broken. The first query always seems to fail after the connection was lost. I am kind of unsure why this is happening since mariadb's/mysql's auto-reconnect feature should reconnect immediately. I will have to test some things and then get back to you.

HavannaFR commented 2 years ago

Sorry for the late reply. I have tested the issue and it does appear to be broken. The first query always seems to fail after the connection was lost. I am kind of unsure why this is happening since mariadb's/mysql's auto-reconnect feature should reconnect immediately. I will have to test some things and then get back to you.

No worries, thank you very much for your answer, hope you can find a solution soon :) In the meantime I think I will send useless requests from time to time to maintain the connection!

FredyH commented 2 years ago

I just released a new version that fixes the issue. If it does not solve your issue, please let me know!