Amazon RDS Aurora Packet Loss Issues
Planned
Been trying to get RDS Aurora working in DataGrip but still getting errors below:
[2019-09-07 20:53:10] [08S01] Communications link failure
[2019-09-07 20:53:10] The last packet successfully received from the server was 69 milliseconds ago. The last packet sent successfully to the server was 95 milliseconds ago.
[2019-09-07 20:53:10] java.io.IOException: Socket is closed
Getting this when connecting sometimes and certain tables in the databases, all empty tables too so unsure why it's having issues.
Thanks
Please sign in to leave a comment.
@Chris Hanson,
Could you specify DB engine behind Aurora?
Make sure you configured your DB engine to accept TCP/IP connections and you've added exception in firewall.
I am having what appears to be the same issue, intermittently during essentially every DataGrip session and persistently for many months. My database is RDS Aurora MySQL 5.6.10.
Test connection returns the following:
DBMS: MySQL (ver. 5.6.10)
Case sensitivity: plain=exact, delimited=exact
Driver: MySQL Connector/J (ver. mysql-connector-java-8.0.15 (Revision: 79a4336f140499bd22dd07f02b708e163844e3d5), JDBC4.2)
Ping: 237 ms
SSL: yes
Example error message:
[08S01] Communications link failure
The last packet successfully received from the server was 82 milliseconds ago. The last packet sent successfully to the server was 155 milliseconds ago. java.io.IOException: Socket is closed
The time since last packet received varies.
When I receive this message, I usually have to retry my query several times before it completes successfully. Then, later in the same session, I often receive the same error again.
I am running DataGrip 2019.3.1 Build #DB-193.5662.58, Runtime version 11.0.5+10-b520.17 x86_64 on MacOS Catalina (10.15.2). However this issue was also occurring under MacOS Mojave (10.14.x).
Clif, Chris Hanson,
Could you try to connect to RDS Aurora with MiriaDB driver?
Amazon recommends to connect with it https://aws.amazon.com/ru/blogs/database/using-the-mariadb-jdbc-driver-with-amazon-aurora-with-mysql-compatibility/
Hi, Vasily,
Thanks for the response and suggestion. I have successfully connected using the MariaDB driver (MariaDB Connector/J (ver. 2.4.1, JDBC4.2)) and I will report back here in a few days, after I've had the opportunity to do some testing.
Thanks,
Clif
This issue has been driving me nuts for months. OP never replied but using Vasily's suggestion does seem to have fixed my issue. I hope this helps anyone else struggling with Aurora on DataGrip.
@Kirk,
Could you specify your set up? What's DB behind Aurora and what jdbc driver do you use?
Vasily,
Sure thing, the DB behind Aurora is MySQL 5.6.10.
I was using "MySQL Connector/J ver. 8.0.15" (This is the driver that was having issues).
After switching to "MariaDB Connector J ver. 2.6.0" everything is working fine. No packet loss or dropped connections so far.
@Kirk and @Vasily,
I apologize for forgetting to report back after my initial (positive) response, but I can confirm that switching to the MariaDB driver has eliminated my packet loss issues with Aurora MySQL 5.6.10. I just reverted temporarily to the MySQL driver and the packet loss issue immediately returned. For the record, here are my working settings:
DBMS: MySQL (ver. 5.6.10)
Case sensitivity: plain=exact, delimited=exact
Driver: MariaDB Connector/J (ver. 2.6.0, JDBC4.2)
Ping: 102 ms
SSL: yes
@Kirk, @Clif,
It looks like JDBC driver issue.
Could you do me a favour and verify there are no packet loss with JDBC drivers:
You can change driver version in DataGrip:
@Vasily,
I had a chance to test the drivers you suggested and here are my findings:
All of the above were tested by performing back-to-back introspection on over 100 databases followed by executing 100 sequential SELECT statements.
I will be switching to the 5.1.47 driver included in DataGrip and will let you know if I experience any ongoing issues with it.
Cheers!
@Vasily,
I am experiencing packet loss with all three of those drivers.
My test was a 100X repetition of "SELECT COUNT(*) FROM <table>" on a table with ~720K rows. With all three drivers, I receive a packet loss error typically after 5 to 10 queries (although the highest number of successful queries was 47).
I also noticed that the MariaDB queries execute 30% faster on average (488.17 ms) than the MySQL queries (701.13 ms).
Hope this additional information helps!
--Clif