Page 1 of 1

Lost connection to server during query / MySQL has gone away

Posted: 16.05.2019, 08:47
by aehimself
Hello,

I'm using Delphi 10.2 with Zeos 7.2.4-stable to connect to a MySQL 8.0.13 server using (the latest available, 8.0 is not yet included in the Windows installer) libmysql.dll version: 6.1.11.
When I am debugging my application (connected to the DB via WLAN) I am greeted with the above two messages quite often, especially if I pause the execution with a breakpoint. This seems not to happen when my program is running outside of the IDE, on the database server OR using an older (5.x) version of mysql.dll. wait_timeout is left at the defult value (28800 seconds, which should be 8 hours) and I am not even close to that delay.

I am suspecting that the weak link will be the Wifi, but shouldn't the server wait for my query a little bit... longer?
It is not really that disturbing as it doesn't seem to happen in release. I'm just wondering if any of you already met this issue and if yes - did you manage to fix it somehow?

Cheers!

Re: Lost connection to server during query / MySQL has gone away

Posted: 17.05.2019, 17:04
by aehimself
I guess we can take the WLAN out of the question :) Today the same happened when I was using a wired connection.
After the usual "Lost connection" a couple of access violation errors and sometimes my application just hangs endlessly, it does not even want to shut down by itself (it gets stuck when it tries to reconnect to the database),

I guess Oracle did it again. In the moment I change libmyqsl.dll with libmariadb.dll, all errors go away.

As this was not the first anomaly with the official connector, I am seriously thinking on switching to MariaDB... maybe it would bring less pain in my life :)