-
Notifications
You must be signed in to change notification settings - Fork 120
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
logger will hang programs indefinitely #75
Comments
Hi, I tried this and was able to reproduce the issue from Ruby 1.9.3 through 2.3.0. I created a logger with It turns out that Ruby's IMO, retrying indefinitely is a feature rather than a bug. The real problems that need to be solved are:
See #68. |
Now that I did some more research, setting sync to true seems to be a good default in a situation where multiple threads or processes are writing to the same file. (Such as a web app.) See #44 |
Regardless, even with |
I believe LogStashLogger should provide two different options:
The current |
#81 fixes the default behavior of connectable devices (including the Unix socket device) so that an exception doesn't block, but simply causes the message to be re-enqueued. This should fix the blocking behavior regardless of the #83 Also allows for messages to be dropped when there is an "unrecoverable" error. However, IMO |
The blocking behavior is fixed in 0.16.0. While fixing this, I discovered that |
Given the above logger, we'll never get to
got here
. Instead you'll likely get:forever and ever.
I found this when integrating
LogStashLogger
with a sinatra application wheresync
was not specified. It would still indefinitely hang the http requests for some reason.The underlying cause seems due to the retry implementation in stud. It seems like this retry logic should be configurable but in the worst case it wouldn't retry indefinitely.
The text was updated successfully, but these errors were encountered: