Symptom: When PHP uses the mysqli driver to connect the DB VPS located at cyberbot-db-01, it will error out and produce the following messages:
2021-04-15 02:14:58: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning: Packets out of order. Expected 0 received 1. Packet size=107 in /data/project/iabot/master/app/src/html/Includes/session.php on line 128 2021-04-15 02:14:58: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning: mysqli_connect(): MySQL server has gone away in /data/project/iabot/master/app/src/html/Includes/session.php on line 128 2021-04-15 02:14:58: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning: mysqli_connect(): Error while reading greeting packet. PID=15 in /data/project/iabot/master/app/src/html/Includes/session.php on line 128 2021-04-15 02:14:58: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning: mysqli_connect(): (HY000/2006): MySQL server has gone away in /data/project/iabot/master/app/src/html/Includes/session.php on line 128
However when accessing the DB via the mysql command from the shell, it connects and queries just fine. Furthermore, my local dev environments that connect to the same DB through SSH tunnels can connect and query as expected as well. As far as I can tell, it is just Toolforge that this is happening on.
This is the connection test output from DataGrip to the SQL server.
As can be seen it's clearly able to identify the DB as MariaDB v10.4.12
I've restarted the SQL server, and restarted the webservice on toolforge. I suspect there may be some incompatibility from some update I may have missed, but it would be appreciated if this could be looked into.