# ArgumentError: comparison of Time with nil failed

**URL:** https://discuss.elastic.co/t/argumenterror-comparison-of-time-with-nil-failed/45239
**Category:** Logstash
**Created:** [March 23, 2016, 2:52pm UTC](https://discuss.elastic.co/t/argumenterror-comparison-of-time-with-nil-failed/45239 "2016-03-23T14:52:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)
#### Post date: [March 23, 2016, 2:52pm UTC](https://discuss.elastic.co/t/argumenterror-comparison-of-time-with-nil-failed/45239/1 "2016-03-23T14:52:20Z")

</div>

hello,

I got this error in logstash.

```
ArgumentError: comparison of Time with nil failed
             >= at org/jruby/RubyComparable.java:155
             >= at org/jruby/RubyTime.java:511
         filter at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-throttle-2.0.2/lib/logstash/filters/throttle.rb:172
   multi_filter at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/filters/base.rb:152
           each at org/jruby/RubyArray.java:1613
   multi_filter at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/filters/base.rb:149
  cond_func_523 at (eval):10519
           each at org/jruby/RubyArray.java:1613
  cond_func_523 at (eval):10516
  cond_func_522 at (eval):10538
           each at org/jruby/RubyArray.java:1613
  cond_func_522 at (eval):10535
    filter_func at (eval):1783
   filterworker at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/pipeline.rb:219
  start_filters at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/pipeline.rb:154

```

I'm getting this error and another one (other topic) and my logstash stops every X hours.

Is there a solutionf or that?

Is there a procedure to debug problems like this in logstash? it's becoming not usefull work like this.

thanks

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [March 25, 2016, 1:42pm UTC](https://discuss.elastic.co/t/argumenterror-comparison-of-time-with-nil-failed/45239/2 "2016-03-25T13:42:56Z")

</div>

This looks like a bug in the throttle filter. Here's the offending line:

> <https://github.com/logstash-plugins/logstash-filter-throttle/blob/v2.0.2/lib/logstash/filters/throttle.rb#L172>

I don't understand how this can fail since we're explicitly checking for `@next_expiration` being non-nil before comparing it to `now`. Perhaps it's a thread-safety problem? Still puzzling since `@threadsafe` is set to false.

I suggest you file an issue on GitHub: [https://github.com/logstash-plugins/logstash-filter-throttle/issues/new](https://github.com/logstash-plugins/logstash-filter-throttle/issues/new)

---

<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 6, 2017, 5:05am UTC](https://discuss.elastic.co/t/argumenterror-comparison-of-time-with-nil-failed/45239/3 "2017-07-06T05:05:19Z")

</div>


