# Gzipped csv input with exec input command =\> "gunzip -c \<file\>" gets OutOfMemoryError

**URL:** <https://discuss.elastic.co/t/gzipped-csv-input-with-exec-input-command-gunzip-c-file-gets-outofmemoryerror/67645>\
**Category:** Logstash\
**Created:** [November 30, 2016, 4:05pm UTC](https://discuss.elastic.co/t/gzipped-csv-input-with-exec-input-command-gunzip-c-file-gets-outofmemoryerror/67645 "2016-11-30T16:05:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![reuschling](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@reuschling](https://discuss.elastic.co/u/reuschling)\
**Post date:** [November 30, 2016, 4:05pm UTC](https://discuss.elastic.co/t/gzipped-csv-input-with-exec-input-command-gunzip-c-file-gets-outofmemoryerror/67645/1 "2016-11-30T16:05:48Z")

</div>

Hi there,

I just trying to read a huge csv file (hundreds of gigabytes). It is gzipped. Since the csv input doesn't support gzipped files, as the csv output does, I try to get the content with an exec command. Nevertheless, I get immediately an OutOfMemoryError. Somebody have an idea?

Here is the error:

[2016-11-30T16:40:37,691][ERROR][logstash.inputs.exec] Exception while running command {:command=\>"gunzip -c /hdd/work/csv.gz", :e=\>java.lang.OutOfMemoryError: Java heap space, :backtrace=\>["org.jruby.util.ByteList.grow(ByteList.java:1095)", "org.jruby.util.ByteList.append(ByteList.java:542)", "org.jruby.util.ByteList.append(ByteList.java:513)", "org.jruby.RubyIO.readAllCommon(RubyIO.java:3328)", "org.jruby.RubyIO.readAll(RubyIO.java:3291)", "org.jruby.RubyIO.read(RubyIO.java:3090)", "org.jruby.RubyIO$INVOKER$i$read.call(RubyIO$INVOKER$i$read.gen)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)", "org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)", "org.jruby.ast.CallOneArgBlockNode.interpret(CallOneArgBlockNode.java:60)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)", "org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)", "org.jruby.ast.RescueNode.interpret(RescueNode.java:116)", "org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)", "org.jruby.ast.BeginNode.interpret(BeginNode.java:83)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)", "org.jruby.evaluator.ASTInterpreter.INTERPRET\_METHOD(ASTInterpreter.java:74)", "org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225)", "org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:219)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:346)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204)", "org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)", "org.jruby.evaluator.ASTInterpreter.INTERPRET\_METHOD(ASTInterpreter.java:74)", "org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)", "org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:203)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)"]}

---

<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:** [December 28, 2016, 4:06pm UTC](https://discuss.elastic.co/t/gzipped-csv-input-with-exec-input-command-gunzip-c-file-gets-outofmemoryerror/67645/2 "2016-12-28T16:06:10Z")

</div>

Closed on December 28, 2016, 4:06pm UTC

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