Postgres 11 issue: "SSL error: DATA_LENGTH_TOO_LONG"

507 views
Skip to first unread message

Hans Ravnaas

unread,
Feb 24, 2020, 8:04:40 PM2/24/20
to Google Cloud SQL discuss
Looking for any thoughts on what is going on here:

Environment:
  • Java 11 GCP Function to copies data into table
  • Postgres 11 Cloud SQL using JDBC driver (org.postgresql:postgresql:42.2.5)
  • No changes to any code or configuration in 2 weeks.

Prior to this Saturday (2/22), everything was working fine. We are using Postgres' CopyManager to load data into a table: copyManager.copyIn(sql, this.reader);

After 2/22, this started failing with "SSL error: DATA_LENGTH_TOO_LONG". These failures are 100% consistent and still happen. I can see that SQL was restarted by Google a few hours before the issue started and I'm wondering if this is somehow related to whatever maintenance happened, SQL version upgrade? I'm unclear what version we had before Saturday, but it's now 11.6.

Interestingly enough, I can avoid the error if the file loaded into the table is under a certain size:
  • 14,052 bytes (16 KB on disk): This fails every time.
  • 14,051 bytes (16 KB on disk): This works every time.
I'd appreciate if someone from Google could confirm what took place during the maintenance window that might be causing this error. We are currently blocked by this as we load much larger datasets into the database than ~14 000 bytes.

NOTE: This is happening across two different GCP projects and SQL servers.

Screen Shot 2020-02-24 at 8.18.44 AM.png



Thanks,
Hans

Hans Ravnaas

unread,
Feb 24, 2020, 8:25:19 PM2/24/20
to Google Cloud SQL discuss
For completeness... 

  • I'm connecting to the private SQL IP address, so similar to jdbc:postgresql://10.90.123.4/<dbnamehere>...
  • I'm not requiring a SSL cert
  • There is Serverless VPC Access set up between the Function and SQL.

Hans

Aref Amiri (Cloud Platform Support)

unread,
Feb 26, 2020, 11:33:58 AM2/26/20
to Google Cloud SQL discuss
Hans,

I suspect that there has been an update or a new roll out that may have not updates the SSL certificate in the process or the process did not complete. I'd suggest to create a Private Issue Tracker and provide the instance name along with the project name, and we shall investigate it further.

Hans Ravnaas

unread,
Mar 5, 2020, 5:06:49 PM3/5/20
to Google Cloud SQL discuss
FYI this was caused by a JDK issue with TLS v1.3, addressed in JDK 11.05. Google will likely upgrade the JDK used for the Cloud Functions JVMs from 11.04 to something newer next week. See https://bugs.openjdk.java.net/browse/JDK-8221253


On Monday, February 24, 2020 at 5:04:40 PM UTC-8, Hans Ravnaas wrote:

Manpreet Sidhu (Google Cloud Support)

unread,
Mar 5, 2020, 9:38:18 PM3/5/20
to google-cloud...@googlegroups.com
Hans,

As suggested by the previous Cloud Support Agent, it would be best if you can create a Private Issue Tracker where you can provide your Instance name along with your Project name. With this information, we will be able to further investigate this issue.

This issue seems to be isolated to your use case as we have not had any other reports.

Hans Ravnaas

unread,
Mar 5, 2020, 9:41:53 PM3/5/20
to Google Cloud SQL discuss
Hi, Manpreet.

I think you are misunderstanding. This has already been through a private Issue Tracker, a support case and I'm now providing info about the solution to others.

Hans

Hans Ravnaas

unread,
Mar 16, 2020, 12:06:19 PM3/16/20
to Google Cloud SQL discuss
FYI a fix for this was deployed today. The JVMs for Cloud Functions are now using 11.06 (upgraded from 11.04).

Manpreet Sidhu (Google Cloud Support)

unread,
Mar 16, 2020, 11:58:18 PM3/16/20
to Google Cloud SQL discuss
That's great. I'm glad that your issue has been resolved. Please feel free to reach out if you have any other issues, questions or concerns.

Enjoy!

-Manpreet
Reply all
Reply to author
Forward
0 new messages