Skip to content

Conversation

@cragonnyunt
Copy link
Contributor

I encountered a similar case as #36601

When without using SSL connection to database, error does not include string SSL in message.

PDO::prepare(): Send of 86 bytes failed with errno=32 Broken pipe (Connection: mysql, SQL: select * from `users` where `uid` = 793d85e0-fe04-4482-a39d-03de71c78f45 and `deleted_at` is null limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 0): PDO::prepare(): Send of 86 bytes failed with errno=32 Broken pipe (Connection: mysql, SQL: select * from `users` where `uid` = 793d85e0-fe04-4482-a39d-03de71c78f45 and `deleted_at` is null limit 1) at /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829)

After above error is thrown once, subsequent queries have no errors. Therefore, my guess is this function cannot catch it.

Without using SSL connection to database does not include string `SSL` in error message
@taylorotwell taylorotwell merged commit 8059bea into laravel:10.x May 13, 2024
@GrahamCampbell
Copy link
Collaborator

I think this change is wrong. It's possible the query succeeded and the result could not be fetched due to a broken pipe.

@GrahamCampbell
Copy link
Collaborator

It's only safe to do this at the SSL negotiation phase, not the query sending/receiving rows phases. Laravel should never accidentally run a query twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants