Skip to content

Closed connection detection improvement #488

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

Closed
bandgeekndb opened this issue Oct 19, 2022 · 1 comment
Closed

Closed connection detection improvement #488

bandgeekndb opened this issue Oct 19, 2022 · 1 comment
Assignees

Comments

@bandgeekndb
Copy link

  • Laravel/Lumen version: 9.27.0
  • RabbitMQ version: 3.8.32
  • Package version: 13.0.1

Describe the bug

Previously, logic was added (#457) to detected closed AMQP connections and fire the appropriate Runtime Exception to trigger Laravel's cleanup process and relaunch the worker thread. But now, I'm getting the following error in my logs:

[2022-10-19 15:42:45] development.ERROR: fwrite(): SSL: Broken pipe {"exception":"[object] (PhpAmqpLib\\Exception\\AMQPRuntimeException(code: 2): fwrite(): SSL: Broken pipe at /var/www/pcdocconvdev.rutgers.edu/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:268)

Steps To Reproduce

Unfortunately, broken pipe errors are typically from transient network issues, so it's tough to reproduce this issue.

Current behavior

  • What happens with the worker? The worker loops constantly, throwing this error
  • Is the message retried or put back into the queue? New messages are not being fetched
  • Is the message acknowledged or rejected? New messages are not being fetched
  • Is the message unacked? N/A
  • Is the message gone? N/A

Expected behavior

This error should be caught like the other "closed connection" errors and the properly worded Laravel error should be thrown so the worker is recycled.

@bandgeekndb
Copy link
Author

Actually going to close this, in reviewing Laravel's internals, the "SSL: Broken pipe" string should already be enough to quit and restart the worker: https://github.com/laravel/framework/blob/15ce569fd93124e8e2257c24e3ed85b9ef9951d6/src/Illuminate/Database/DetectsLostConnections.php#L54

Not sure why my application was not properly closing the connection, but it doesn't seem to be an issue that needs addressing in this library. Thank you!

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

No branches or pull requests

2 participants