Open colinsurprenant opened 4 years ago
In progress PR for grouped timeouts https://github.com/logstash-plugins/logstash-filter-grok/pull/153 which should help mitigate the problem.
not that v4.2.0 of the grok filter was published with the new timeout_scope
option.
We have recently discovered a substantial performance regression introduced by #10976 related to the use of the JRuby
Timeout.timeout
which surfaces in both thekv
andgrok
filters when enabling timeouts (which are enabled by default). Some information on this regression is available in logstash-plugins/logstash-filter-grok#152.The performance regression affects the
kv
filter starting at v4.4.0 and thegrok
filter starting at v4.1.0. The performance regression is compounded when using multiple fallback patterns in grok in particular.The best temporary solution is to disable the timeout handling by setting
timeout_millis => 0
in bothkv
andgrok
. Downgrading to a previous version is not recommended because these were producing random crashes in logstash. We understand that this workaround is not ideal as it can also result in pathological patterns to execute for an unbounded period. Please read our guide about grok patterns https://www.elastic.co/blog/do-you-grok-grok which provides tips on how to avoid such slow or pathological patterns.We are actively into solving this issue, we will report back with progress.
So far we believe the problem is with the JRuby
Timeout.timeout
implementation. @jsvd found the following: