-
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
Error when Errno::ECONNREFUSED - Connection refused #88
Comments
Hi, I'm familiar with this error message. It's ultimately caused by breaking out of Thanks! |
(On a side note, I will probably end up vendoring in |
Hi, When I said stop, I mean the process crash and I need to restart again. Adding the "drop_messages_on_flush_error: true" option, for the moment works properly. Also comment that I'm not working with only one Sinatra App, I have several (each one listening in different port...) and probably the error happens when multiple process are trying to push data to Logstash at the same time... Thanks |
Okay, thanks, that's helpful to know. Are all your Sinatra apps running in a single process, writing to the same instance of LogStashLogger? That could definitely make thread-safety issues worse. |
No, all the Sinatra apps runs in different processes. In some cases, when the error appears, more than one of these process crashes. |
The odd thing about the backtrace you attached is that it is raised from within a thread set up by Normally, an exception raised in a thread will not cause the entire program to abort. Rather, the thread will simply die. Unless you set It's looking more and more like I'll need to use a custom buffer implementation. Most likely I will vendor in |
Fork and vendor in `Stud::Buffer` in order to customize its behavior better. This eliminates some of the issues with how `Stud::Buffer` was being (ab)used before, namely unpredictable exceptions causing mutex issues, and non-used threads causing the process to crash. As a side-effect, the new `autoflush` setting, which defaults to false, allows for log messages to truly be buffered and flushed in the background. By default, there should no longer be any blocking behavior or exceptions bubbling up to the process. This should fix #88
This should now be fixed in 0.18.0. |
Hello,
I'm trying to use the last update 0.16.0 (or 0.17.0) and I'm having problems when logstash is down and the process (a Sinatra App) can't access to it. So, in general I see the following log:
E, [2016-07-25T11:37:56.750065 #4282] ERROR -- : [LogStashLogger::Device::UDP] Errno::ECONNREFUSED - Connection refused
But sometimes, when some logs messages are defined, the process stops with the following message:
I'm trying to generate the same behaviour with a small sinatra app, but for the moment I can't.
The text was updated successfully, but these errors were encountered: