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

Detect additional error message "Broken Pipe" as Lost Connection #5280

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

kingIZZZY
Copy link
Contributor

Example fatal error trying to use database connection from PDOPool after a long time of not using them

Fatal error: Uncaught ErrorException: PDOStatement::execute(): Send of 2109 bytes failed with errno=32 Broken pipe in @swoole/library/core/Database/PDOStatementProxy.php:53
Stack trace:
#0 [internal function]: Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler::Hyperf\ExceptionHandler\Listener\{closure}(8, 'PDOStatement::e...', '@swoole/library...', 53)
#1 @swoole/library/core/Database/PDOStatementProxy.php(53): PDOStatement->execute(Array)
#2 /home/dev/project/app/Tasks/SomethingTask.php(1921): Swoole\Database\PDOStatementProxy->__call('execute', Array)
#3 [internal function]: App\Tasks\SomethingTask::batch('1', NULL, Array, 93, false)
#4 {main}
  thrown in @swoole/library/core/Database/PDOStatementProxy.php on line 53

Candidate strings

  • "Broken pipe" ✅ selected based on Hyperf framework - see below
  • "errno=32 Broken pipe"
  • "bytes failed with errno=32 Broken pipe"

See also

...
'Broken pipe',
...

Copy link

codecov bot commented Mar 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.56%. Comparing base (9f1c48a) to head (b8b3330).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5280      +/-   ##
==========================================
+ Coverage   71.54%   71.56%   +0.01%     
==========================================
  Files         105      105              
  Lines       16084    16084              
  Branches     2973     2972       -1     
==========================================
+ Hits        11507    11510       +3     
+ Misses       4522     4519       -3     
  Partials       55       55              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matyhtf matyhtf merged commit df3f3e3 into swoole:master Mar 26, 2024
38 of 43 checks passed
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.

2 participants