-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Stop filterworker and outputworker from crashing #1373
Conversation
When individual events cause a filter to throw an exception, the entire filterworker thread will stop accepting data. This patch puts the exception handler inside the event processing loop to avoid this.
Individual events that cause an output plugin to throw an exception can crash the logstash application. This patch puts an exception handler inside the output processing loop to avoid this.
Can one of the admins verify this patch? |
f86287d
to
a536eef
Compare
This seems to work quite well for us. Would be nice to see it merged. @xebab can you do their whole CLA thing? |
Thanks @thomdixon for pointing out this CLA issue to me. I was not aware of that. I have just signed the stuff so I hope this can get merged now. |
@xebab The code looks good, but can you also add some test in the pipeline_spec (https://github.com/elasticsearch/logstash/blob/master/spec/core/pipeline_spec.rb) that test this functionality? To test that you can use mocks from rspec as described https://relishapp.com/rspec/rspec-mocks/docs |
test this please |
Test FAILed. |
@xebab I was trying to test this PR and found there is no Rakefile, do you know why ? could you update the PR to be in sync with master? |
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'. |
1 similar comment
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'. |
Closing this issue since the code has deviated quite a bit and we will not be able to add this feature now. |
When an exception is thrown during event processing, logstash may stop accepting data or crash altogether (cf. LOGSTASH-1353, LOGSTASH-1440 or LOGSTASH-1872).
I have commited two changes that make logstash continue working after encountering an exception. To test the patches, you can use the following configs.
For the filterworker case:
For the outputworker case:
Please consider including these patches in the next release. Thanks.