Code Monkey home page Code Monkey logo

Comments (3)

gingerwizard avatar gingerwizard commented on June 27, 2024

Steps to reproduce:

  1. Ensure ES is installed > 5.5.x
  2. Create a simple index - ensure the doc has @timestamp field
PUT test/test/1
{
  "message":"test",
  "@timestamp":"2017-09-10T23:00:00.000Z"
}
  1. Configure LS as follows
input {
    stdin {
    }
}

filter {
        elasticsearch {
              hosts => ["localhost:9200"]
              query => "test"
              index => "test"
              fields => [ ["message", "match"] ]
              user => "elastic"
              password => "changeme"
        }
}


output {
     stdout { codec => dots }
}
  1. Ensure workers in LS is > 1 (default if more than 1 core)
  2. Pipe any large file though LS i.e.

cat /tmp/nice_big_file | ./logstash -f ../conf/es_filter_issue/logstash.conf

from logstash-filter-elasticsearch.

ph avatar ph commented on June 27, 2024

@gingerwizard

We have discussed this morning and like I've said it appear to be a thread safety issues in the elasticsearch-ruby client that is show under heavy load.

We have two plan for this plugin:

Long term
We are planning to rewrite the plugin using the same client library that we have developed for the elasticsearch output or use the java native client.

Short term
Meanwhile we will implement a fix to work around the thread safety issue, we will create a new connection object for every worker thread. This will waste a bit of resource but it will make sure that every thread have their own view of the world.

from logstash-filter-elasticsearch.

ph avatar ph commented on June 27, 2024

@gingerwizard I have created #77, and it appears to fix the issue you were having. With your use case I can reproduce the error when I apply the PR the error is gone.

I have created #78 as a long term goal.

from logstash-filter-elasticsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.