Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Add new error messages for detecting lost connections #47398

Merged
merged 1 commit into from
Jun 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Illuminate/Database/DetectsLostConnections.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ protected function causedByLostConnection(Throwable $e)
'Reason: Server is in script upgrade mode. Only administrator can connect at this time.',
'Unknown $curl_error_code: 77',
'SSL: Handshake timed out',
'SQLSTATE[08006] [7] SSL error: sslv3 alert unexpected message',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sslv3 😭 do we really want to support use of SSL v3? Do any modern databases actually still support this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AWS Aurora to using AWS RDS Proxy

Seems like a configuration error perhaps? Can you try setting the minimum TLS version to 1.2 in the parameter group?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the error message being received here; all connections are at minimum TLS 1.2 I can proof this with a query like this:
SELECT * FROM pg_stat_activity JOIN pg_stat_ssl USING(pid);
and the output of any Laravel initiated connection looks like this:

…
ssl              | t
version          | TLSv1.2
cipher           | AES128-SHA256
bits             | 128
…

We can change it to SQLSTATE[08006] [7] SSL error: if that makes more sense; I just never had any other message then the two I added in this PR.

'SQLSTATE[08006] [7] unrecognized SSL error code:',
]);
}
}