# Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash. {:pipeline\_id=\>"main", "exception"=\>"no implicit conversion to rational from nil"

**URL:** https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370
**Category:** Logstash
**Created:** [June 9, 2021, 4:59am UTC](https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370 "2021-06-09T04:59:28Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![AmitC](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@AmitC](https://discuss.elastic.co/u/AmitC)
#### Post date: [June 9, 2021, 4:59am UTC](https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370/1 "2021-06-09T04:59:28Z")

</div>

Logstash Version : 6.1.1

> Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash. {:pipeline\_id=\>"main", "exception"=\>"no implicit conversion to rational from nil"

I am getting this error in Logstash. I am not sure for which logs it is getting error. We are processing millions of records every hour.

I checked my pipeline and tried all possible way to find the problem. But still I can't find.

I also enable log level to TRACE from INFO but that is also not provided any TRACE log.

How I should resolve this issue? It is coming twice/thrice a day and we lose the data because logstash restarted after this error

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [June 9, 2021, 5:31am UTC](https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370/2 "2021-06-09T05:31:27Z")

</div>

Hello,

Please share your pipeline so people can see what logstash is trying to do and what could cause the error. Use the preformatted text `</>` to share it.

---

<div class="post-metadata">

### Author: ![AmitC](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@AmitC](https://discuss.elastic.co/u/AmitC)
#### Post date: [June 9, 2021, 5:47am UTC](https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370/3 "2021-06-09T05:47:07Z")

</div>

It's more than 3k line of filters and that is related to my application which i can't share as public.

If any one need what I am doing in that I can tell.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 9, 2021, 4:03pm UTC](https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370/4 "2021-06-09T16:03:15Z")

</div>

There should be a stacktrace to show you where in the code that happened. Please post that.

---

<div class="post-metadata">

### Author: ![AmitC](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@AmitC](https://discuss.elastic.co/u/AmitC)
#### Post date: [June 10, 2021, 5:20am UTC](https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370/5 "2021-06-10T05:20:15Z")

</div>

Stacktrace only provided this 2 exceptions

> Blockquote[2021-05-31T15:04:18,928][ERROR][logstash.pipeline] Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash. {:pipeline\_id=\>"main", "exception"=\>"no implicit conversion to rational from nil", "backtrace"=\>["org/jruby/RubyTime.java:697:in `-'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/timestamp.rb:21:in `-'", "D:/elk/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-filter-elapsed-4.1.0/lib/logstash/filters/elapsed.rb:161:in `filter'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/filters/base.rb:145:in `do\_filter'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/filters/base.rb:164:in `block in multi_filter'", "org/jruby/RubyArray.java:1734:in `each'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/filters/base.rb:161:in `multi_filter'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/filter_delegator.rb:48:in `multi\_filter'", "(eval):304590:in `block in initialize'", "org/jruby/RubyArray.java:1734:in `each'", "(eval):304574:in `block in initialize'", "(eval):304716:in `block in initialize'", "org/jruby/RubyArray.java:1734:in `each'", "(eval):304708:in `block in initialize'", "(eval):38028:in `block in filter_func'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:455:in `filter\_batch'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:434:in `worker_loop'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:393:in `block in start\_workers'"], :thread=\>"#\<Thread:0x268d4f51 sleep\>"}

> [2021-05-31T15:04:19,100][FATAL][logstash.runner] An unexpected error occurred! {:error=\>#\<TypeError: no implicit conversion to rational from nil\>, :backtrace=\>["org/jruby/RubyTime.java:697:in `-'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/timestamp.rb:21:in `-'", "D:/elk/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-filter-elapsed-4.1.0/lib/logstash/filters/elapsed.rb:161:in `filter'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/filters/base.rb:145:in `do\_filter'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/filters/base.rb:164:in `block in multi_filter'", "org/jruby/RubyArray.java:1734:in `each'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/filters/base.rb:161:in `multi_filter'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/filter_delegator.rb:48:in `multi\_filter'", "(eval):304590:in `block in initialize'", "org/jruby/RubyArray.java:1734:in `each'", "(eval):304574:in `block in initialize'", "(eval):304716:in `block in initialize'", "org/jruby/RubyArray.java:1734:in `each'", "(eval):304708:in `block in initialize'", "(eval):38028:in `block in filter_func'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:455:in `filter\_batch'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:434:in `worker_loop'", "D:/elk/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:393:in `block in start\_workers'"]}

Other than this there are debug logs. Like

1. [DEBUG][logstash.util.decorators] filters/LogStash::Filters::Grok: adding value to field...
2. [DEBUG][logstash.pipeline] filter received...
3. [DEBUG][logstash.pipeline] output received...
4. [DEBUG][logstash.filters.grok] Event now: {:event=\>#LogStash::Event:0x4cfed8ec}
5. [DEBUG][logstash.util.decorators] filters/LogStash::Filters::Grok: adding tag
6. [DEBUG][logstash.filters.grok] Event now: {:event=\>#LogStash::Event:0x1f02f20c}

and many more. According to the other logs which I have seen it has no clue to get where was the error. It does not print any error line number of pipeline. Or Log which has problem.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 10, 2021, 3:09pm UTC](https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370/6 "2021-06-10T15:09:41Z")

</div>

> [@AmitC](#):
>
> "D:/elk/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-filter-elapsed-4.1.0/lib/logstash/filters/elapsed.rb:161

The exception is occurring in an elapsed filter and one of the events does not have an @timestamp field, probably the start event.

---

<div class="post-metadata">

### Author: ![AmitC](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@AmitC](https://discuss.elastic.co/u/AmitC)
#### Post date: [June 16, 2021, 6:00am UTC](https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370/7 "2021-06-16T06:00:14Z")

</div>

I resolved this issue. I need to reduce the load on the logstash and it started working

Earlier I was running 10 pipeline workers with 5k logs per worker. After reducing this to 1 pipeline worker and 2k logs per worker. It started working.

I was having good config server of AWS c5.4xlarge instance and provided good amount of ram to logstash by updating jvm config of logstash.

Logstash should provide proper info. I was looking at my logs and was blocked finding that why it is not working. Later I reverted my last change of increasing the pipeline worker and logs per worker and it started working.

Thanks everyone for you answer!!!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 14, 2021, 6:00am UTC](https://discuss.elastic.co/t/exception-in-pipelineworker-the-pipeline-stopped-processing-new-events-please-check-your-filter-configuration-and-restart-logstash-pipeline-id-main-exception-no-implicit-conversion-to-rational-from-nil/275370/8 "2021-07-14T06:00:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
