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] Change ssl: broken pipe to broken pipe #51388

Merged
merged 1 commit into from
May 13, 2024
Merged

[10.x] Change ssl: broken pipe to broken pipe #51388

merged 1 commit into from
May 13, 2024

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
26 checks passed
@GrahamCampbell
Copy link
Member

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
Member

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