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


(Reuschling) #1

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)"]}


(system) #2

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