Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ For a `timer => { "thing" => "%{duration}" }` you will receive the following fie
The default lengths of the event rate window (1, 5, and 15 minutes)
can be configured with the `rates` option.

IMPORTANT: When using several `metrics` filters (in particular the `timer`), it might
become necessary to increase the `Xss` setting in `jvm.options` to avoid `StackOverflowException`.
Comment on lines +78 to +79

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
IMPORTANT: When using several `metrics` filters (in particular the `timer`), it might
become necessary to increase the `Xss` setting in `jvm.options` to avoid `StackOverflowException`.
TIP: If you see `StackOverflowException` erors and are using several `metrics` filters (the `timer` in particular ), try increasing the `Xss` setting in `jvm.options`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider rewording as a remedy IF a user sees this problem rather than tempting people to fiddle with jvm settings without need?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me why the StackOverflowException happens more if they use the particular timer setting. The StackOverflowException is a general problem, it's related to the way Logstash plans the execution of a pipeline.

Explaining better what I mean: suppose the pipeline is configured with 2 filters, I -> F1 - F2 -> O, the execution plan is:

  • execute F1
  • it's F1 that invokes the execution of F2, so it's like F2(F1()) (NB this is formally incorrect, but it's useful to explain the nesting of the calls)

Every filter count as a stack frame in the execution thread's stack. So this comment is more general in Logstash execution context, it's not specific to this plugin; the tip is part of the general Logstash documentation, where it's already discussed https://www.elastic.co/guide/en/logstash/current/jvm-settings.html#stacks-size


==== Example: Computing event rate

For a simple example, let's track how many events per second are running
Expand Down