Sometimes I catch an error from PostgreSQL RDS.
SQLSTATE [HY000]: general error: 7 SSL error: invalid key length
It usually works fine, but sometimes an error.
What could it be? Any ideas?
- Engine: PostgreSQL 9.4.1
- Certificate Authority: rds-ca-2015 (March 5, 2020)
- Instance Class: db.m3.medium
- Storage Type: General (SSD)
- IOPS: Disabled
- Storage: 100 GB
- Encryption Enabled: No
- DB Instance Status: Available
- Multi AZ: No
Updated 2016-01-18
The SQL query does not matter, I will catch an error with different queries, usually primitive. And I do not see any relationship with the SQL query.
I noticed that this happens when SQL queries have a delay:
- <- Request from WebHook PayPal event
- -> SQL queries (everything is fine)
- → PayPal API protocol request for verification (everything is fine)
- → SQL queries (catch the error)
I can’t understand, is this only for AWS / RDS or has someone caught it in other cases?
Updated 2016-01-27
From error / postgresql.log
LOG: Failed to get data from client: connection reset with peer
When I try to execute the request again, I get another error:
SQLSTATE [HY000]: general error: 7 no connection to the server
Reconnecting does not help, I have the same error "no connection to the server"
The script completed 50 attempts during the day, and at the end of the script it worked without error.
The error seems to be related to the network or the connection (PDO connection, PHP-FPM, PHP 5.6, SSL)