GDS Unable to connect to database: Communications link failure - mysql

Since this morning we're experiencing some problems in our Google Datastudio reports, connected through the MySQL connector. We are running MySQL8 through SSL and have not had any problems before. Unfortunately this morning some diagrams showed an error:
Unable to connect to database: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
It appears to be random what diagrams will get the error. When I try to refresh the data for a specific diagram by, for example, changing the date, it works again. Also, manually refreshing the report results in random broken diagrams.
Connections etc are all tested with external tools and seem to work fine.
Hope anyone can help me.

some users complains similar issue for few days on community forum
There is no status page that can confirm this and there is no channel support existing for GDS
https://support.google.com/datastudio/threads?hl=en&thread_filter=(category%3Aconnect_to_data)&max_results=20

Related

SQL Communications link failure when accessing SQL database on the same machine

I am running a Minecraft server which is querying a SQL database on the same VPS as the game server for various bits of data (ranks, warps and such). Today have encountered something which has stumped me and I am turning to you hoping for an answer.
My VPS is running Ubuntu Server 18.04.4 LTS, the Minecraft server is being ran from within a screen instance and no changes to the server, operating system or mySQL that I am aware of have been made that could have caused an issue and given I am the only one with SSH access to the server theres no way an update could have been made unless it was silently updated in the background without my knowledge. The problem just randomly happened out of nowhere.
The specific error I am getting (output from MC server console)
2021-05-19 12:44:51 [INFO] [STDOUT] [SERVERMANAGER EXCEPTION | com.mysql.cj.jdbc.exceptions.CommunicationsException] Communications link failure
2021-05-19 12:44:51 [INFO] [STDOUT] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Granted I have little experience with SQL (I inherited this SQL setup from someone else who I am unable to contact for assistance to fix this) but the last message of this error lead me to believe that everything with the Minecraft server itself was fine and the SQL database simply was not acknowledging the packets the Minecraft server was sending.
However despite...
Restarting the mySQL service with sudo service mysql restart
Verifying that the servermanager database I am using is still present with SHOW DATABASES;
Verifying that the three tables servermanager has are still present with SHOW TABLES;
Restarting the VPS
I cannot for the life of me seem to get this issue to fix itself!
Anyone able to offer any insight?

MySQL server overloading

I have a MySQL server that is hosting my website. Yesterday, after trying to empty a certain database, I started receiving the following error when attempting to connect to my site :
PDOException: SQLSTATE[HY000] [1040] Too many connections in lock_may_be_available()
(line 167 of /home/vksappc/public_html/prod/includes/lock.inc).
After searching online for a possible solution, I restarted the server and everything was okay. Today, however, I've noticed that the number of active connections is constantly and slowly rising until it reaches the limit of 151 :
Screenshot of thread count
At which point the server then seems to timeout those connections and everything resets, only to start its gradual climb all over again:
Screenshot of new thread count
This is really becoming a big problem and as I am quite new to managing a server, I am not too sure what could be causing this or what to do next.
Any ideas?
Turns out there was a specific connection that was stuck in a loop of sending a request unsuccessfully and trying over and over again. Once we found which connection it was, we were able to kill all its processes and fix the issue. Thanks to #WilsonHauck for the tip in the comments.

fail to connect to MySQL using IntelliJ IDEA

I wanted to use Hibernate, so I created a MySQL datasource by database of IntelliJ IDEA. But I got a problem that "connection to MySQL" failed.
I did not change any default setting and just added "demo" as database name.
Here is the description of the problem returned by IntelliJ IDEA.
Connection to MySQL - demo#localhost failed.
Communications link failure.
The last packet sent successfully to the server was 0 milliseconds ago.
The driver has not received any packets from the server.
(4s)
Sorry but there is no further information about the problem.
I granted IntelliJ IDEA the permission to access Internet since I can download packages via Maven dependencies, so probably there is not any problem with my Internet.

MYSQL error, cannot start service and mysql.sock not found

Yesterday, my website crashed. Or, what appears to be a crash.
My host (JustHost) have disclosed that it was a SAN problem and have been rebuilding it. It's hard to get anymore information out of them because they are playing their cards very close to their chest for some reason.
I have suffered almost 24 hours downtime in 2 days and I'm getting fed up.
The error I am receiving on the frontend of the website is:
Database connection error (2): Could not connect to MySQL.Database connection error (2): Could not connect to MySQL.
Trying to access my phpMyadmin from cPanel gives me the following error:
Accessing SSH and trying to start the mysql service via putty I get:
Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql /mysqld.pid).
Can anyone please help me resolve this issue as my host is rather useless!
Thanks!
Yep, mysqld is down. Did you try running "mysqld_safe&"?
For anyone who wishes to know the conclusion of this issue.
I have been left with 2 choices:
1) Be patient and wait for Just Host to fix the issue and potentially lose my Google search rankings and a lot more future revenue
2) Set up a new hosting account, transfer my data over and wait for the domain to propagate.
I have chosen the latter of the two. My confidence in Just Host as a customer service hub and web hosting provider has thoroughly diminished to the point where all of my hosting accounts will now be switched over to another provider.
They have let me down by not fixing the issue in good time and have passed me from pillar to post in live chat, email support and phone support. The final nail in the coffin was my request for them to backup my databases and send them to me via email being met with the resoundingly passive "sorry, we do not provide that service" response.
I would do it myself if only I had access to phpMyadmin, which I do not have because of a server error that they have been incapable of fixing for the past 72 hours.
Goodbye Just Host.

ColdFusion 10 Communications link failure to MySQL

We are migrating some websites onto a cloud infrastructure running Windows 2008 virtual machines. These websites all run on ColdFusion with MySQL databases. They currently are running in our CoLo with no problems. Additionally, they are running on our development network in our offices with no problems.
We are setting up our cloud to match as closely as possible the configuration we currently use which is, essentially, CF10 + IIS on one server and MySQL on a separate machine. We are 99% finished and most things are running great. However....
We have run into a couple, as in 2, places where we click a link/button and are greeted with:
Error Executing Database Query.
Communications link failure The last packet successfully received from the server was 0 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
Scanning the stack-trace I also find:
Caused by: java.net.SocketException: Connection reset
The communications link error is ALWAYS: 0ms.
What's most puzzling is the Queries that seem to be causing this are simple queries that are used ALL OVER the sites with no problems. Why they are failing at hese 2 particular places has us at wits end.
Our only clue is, looking at the CF Error description of what scripts are called, we can see the script where the query is failing is getting called twice? For example, one of the occurences is in our Application file:
>The error occurred in D:/Our_Web_Sites/oursite/Application.cfm: line 73
>Called from D:/Our_Web_Sites/oursite/Application.cfm: line 17
>Called from D:/Our_Web_Sites/oursite/Application.cfm: line 1
>Called from D:/Our_Web_Sites/oursite/Application.cfm: line 73
>Called from D:/Our_Web_Sites/oursite/Application.cfm: line 17
>Called from D:/Our_Web_Sites/oursite/Application.cfm: line 1
We can find nothing in our CF code that would be causing the script to be called twice so our guess is the first call is failing on the Query so CF tries again...only to fail and error.
Googling this issue I've found lots of posts about changing the MySQL timeouts. None of those worked and I didn't expect them to since what we're dealing with doesn't appear to be a timeout issue. These pages fail each and every time.
The closest we've come to a solution came from this blog posting:
http://www.talkingtree.com/blog/index.cfm/2011/1/12/Validation-Query-for-MySQL-communications-link-failure!
If we UNCHECK the "Maintain connections across client requests. " setting in CFAdmin then the error goes away. The blog suggests leaving that checked, which is our preference, and using Connection Validation of "SELECT 1;". Try that...same error.
We've also tried the JDBC AutoConnect=true option. No effect.
Downloaded latest JDBC Connector and used it instead of standard CF10-MySQL connector. No effect.
Again, 99% of the site works with the exception of these two links, both of which work just fine in all our other environments. Any other ideas?
I feel like I've had a similar problem every time I upgrade CF or MySQL. Usually a change in the JDBC driver or connection string helps, which I see you already tried.
Have you checked the MySQL error log for any hints? Ours is in /var/lib/mysql (whatever your 'datadir' variable is set to) and ends with a .err extension.
Also, maybe trying some of the other JDBC connection string options for your version? I see some extended logging you can enable.
http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html
Found the issue. We are running our network on Savvis' cloud infrastructure. The Windows server instances we were using from Savvis had Trend Micro Deep Security Agent installed. This is an intrusion protection system and it was the problem. Disabling the service cleared up all communication errors. I have no clue why it was rejecting some queries that it had just accepted previously. I am just glad to (finally) put this behind me!