OutOfMemoryError while performing preview analysis

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

OutOfMemoryError while performing preview analysis

Prasad Khandekar
Hello,

For a large project which my cases is creating a preview database of 844756992 & which takes almost 306996ms is generating an ReadTimeout error on client side and on the server side creating OutOfMemory exception. The servier side stack trace is

2015.01.12 01:55:23 ERROR http-bio-0.0.0.0-8080-exec-5 [rails] 
Java::JavaLang::OutOfMemoryError ():
  java.io.FileInputStream.readBytes(Native Method)
  java.io.FileInputStream.read(FileInputStream.java:220)
  com.google.common.io.ByteStreams.read(ByteStreams.java:805)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:660)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:641)
  com.google.common.io.Files.toByteArray(Files.java:199)
  org.sonar.core.preview.PreviewCache.fileToByte(PreviewCache.java:133)
  org.sonar.core.preview.PreviewCache.getDatabaseForPreview(PreviewCache.java:95)
  org.sonar.server.ui.JRubyFacade.createDatabaseForPreview(JRubyFacade.java:406)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455)
  org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316)
  org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:61)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  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:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:74)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.ArrayNode.interpretPrimitive(ArrayNode.java:94)
  org.jruby.ast.ArrayNode.interpret(ArrayNode.java:84)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:81)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:39)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:71)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:43)
  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:214)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:66)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:214)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:336)
  org.jruby.runtime.BlockBody.call(BlockBody.java:73)
  org.jruby.runtime.Block.call(Block.java:101)
  org.jruby.RubyProc.call(RubyProc.java:290)
  org.jruby.RubyProc.call(RubyProc.java:224)
  org.jruby.RubyProc$INVOKER$i$0$0$call.call(RubyProc$INVOKER$i$0$0$call.gen)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
  org.jruby.ast.CallNoArgBlockPassNode.interpret(CallNoArgBlockPassNode.java:53)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.RubyClass.finvoke(RubyClass.java:690)
  org.jruby.runtime.Helpers.invoke(Helpers.java:498)
  org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:363)
  org.jruby.javasupport.JavaEmbedUtils$1.callMethod(JavaEmbedUtils.java:143)
  org.jruby.rack.DefaultRackApplication.call(DefaultRackApplication.java:64)
  org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:33)
  org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:66)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.MasterServletFilter.doFilter(MasterServletFilter.java:80)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:42)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.DatabaseSessionFilter.doFilter(DatabaseSessionFilter.java:36)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.ProfilingFilter.doFilter(ProfilingFilter.java:81)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:178)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  java.lang.Thread.run(Thread.java:662)

Looks like the createDatabaseForPreview method of JRubyFacade is trying to read the entire cache database into memory . Can it get changed so that instead of reading all bytes in memory it sends chunk by chunk  instead.

Is it possible to increase the Read TimeOut  period on client side.


Regards,
Prasad P. Khandekar
Sent from Windows Mail

This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from any computer.
Reply | Threaded
Open this post in threaded view
|

Re: OutOfMemoryError while performing preview analysis

Freddy Mallet
Hello Prasad,

What is the size of this large project because indeed this feature is not yet as scalable as we would like it to be ?

Thanks

-----
SonarQube for Continuous Inspection

On Mon, Jan 12, 2015 at 10:02 AM, Prasad Khandekar <[hidden email]> wrote:
Hello,

For a large project which my cases is creating a preview database of 844756992 & which takes almost 306996ms is generating an ReadTimeout error on client side and on the server side creating OutOfMemory exception. The servier side stack trace is

2015.01.12 01:55:23 ERROR http-bio-0.0.0.0-8080-exec-5 [rails] 
Java::JavaLang::OutOfMemoryError ():
  java.io.FileInputStream.readBytes(Native Method)
  java.io.FileInputStream.read(FileInputStream.java:220)
  com.google.common.io.ByteStreams.read(ByteStreams.java:805)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:660)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:641)
  com.google.common.io.Files.toByteArray(Files.java:199)
  org.sonar.core.preview.PreviewCache.fileToByte(PreviewCache.java:133)
  org.sonar.core.preview.PreviewCache.getDatabaseForPreview(PreviewCache.java:95)
  org.sonar.server.ui.JRubyFacade.createDatabaseForPreview(JRubyFacade.java:406)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455)
  org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316)
  org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:61)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  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:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:74)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.ArrayNode.interpretPrimitive(ArrayNode.java:94)
  org.jruby.ast.ArrayNode.interpret(ArrayNode.java:84)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:81)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:39)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:71)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:43)
  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:214)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:66)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:214)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:336)
  org.jruby.runtime.BlockBody.call(BlockBody.java:73)
  org.jruby.runtime.Block.call(Block.java:101)
  org.jruby.RubyProc.call(RubyProc.java:290)
  org.jruby.RubyProc.call(RubyProc.java:224)
  org.jruby.RubyProc$INVOKER$i$0$0$call.call(RubyProc$INVOKER$i$0$0$call.gen)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
  org.jruby.ast.CallNoArgBlockPassNode.interpret(CallNoArgBlockPassNode.java:53)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.RubyClass.finvoke(RubyClass.java:690)
  org.jruby.runtime.Helpers.invoke(Helpers.java:498)
  org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:363)
  org.jruby.javasupport.JavaEmbedUtils$1.callMethod(JavaEmbedUtils.java:143)
  org.jruby.rack.DefaultRackApplication.call(DefaultRackApplication.java:64)
  org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:33)
  org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:66)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.MasterServletFilter.doFilter(MasterServletFilter.java:80)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:42)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.DatabaseSessionFilter.doFilter(DatabaseSessionFilter.java:36)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.ProfilingFilter.doFilter(ProfilingFilter.java:81)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:178)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  java.lang.Thread.run(Thread.java:662)

Looks like the createDatabaseForPreview method of JRubyFacade is trying to read the entire cache database into memory . Can it get changed so that instead of reading all bytes in memory it sends chunk by chunk  instead.

Is it possible to increase the Read TimeOut  period on client side.


Regards,
Prasad P. Khandekar
Sent from Windows Mail

This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from any computer.

Reply | Threaded
Open this post in threaded view
|

Re: OutOfMemoryError while performing preview analysis

Prasad Khandekar
Hello Freddy,

Thank’s for a quick reply. The project consists of 3831 Files (1971 Java, 902 JavaScripts, 958 JSP)  2024 classes, 1,110,042 lines of code It consists of 3 components, Java Sources, JavaScripts & Web Sources.

While I was going through the code, I found out that batch_bootstrap_controller,rb is actually trying to get the database as byte array () and then streams this back.

db_content = java_facade.createDatabaseForPreview(project && project.id)
send_data String.from_java_bytes(db_content)

The method  createDatabaseForPreview in JRubyFacade is implemented as shown below

public byte[] createDatabaseForPreview(@Nullable Long projectId) {
    return get(PreviewCache.class).getDatabaseForPreview(projectId);
}
& in PreviewCache it’s actually checking whether the cached snapshot is recent or not and creating a new database. This takes lot’s of time, which is not a problem but the real trouble starts when PreviewCache class actually reads the entire snapshot into a byte array & return that byte array.

File dbFile = new File(getCacheLocation(projectId), lastTimestampPerProject.get(notNullProjectId) + PreviewDatabaseFactory.H2_FILE_SUFFIX);
return fileToByte(dbFile);

Can this be implemented in a different way such that the method will continue to create a new snapshot if earlier has expired, but will return the absolute path of the snapshot file instead of byte array. Then in batch_bootstrap_controller,rb  we can use send_file instead of send_data.

I am right now trying to change it this way and see whether it works as expected or not. For the ReadTimeout I found the appropriate settings which should resolve that issue.

Regards,
Prasad P. Khandekar
Sent from Windows Mail

From: [hidden email]
Sent: ‎Monday‎, ‎12‎ ‎January‎ ‎2015 ‎23‎:‎31
To: [hidden email]

Hello Prasad,

What is the size of this large project because indeed this feature is not yet as scalable as we would like it to be ?

Thanks

-----
SonarQube for Continuous Inspection

On Mon, Jan 12, 2015 at 10:02 AM, Prasad Khandekar <[hidden email]> wrote:
Hello,

For a large project which my cases is creating a preview database of 844756992 & which takes almost 306996ms is generating an ReadTimeout error on client side and on the server side creating OutOfMemory exception. The servier side stack trace is

2015.01.12 01:55:23 ERROR http-bio-0.0.0.0-8080-exec-5 [rails] 
Java::JavaLang::OutOfMemoryError ():
  java.io.FileInputStream.readBytes(Native Method)
  java.io.FileInputStream.read(FileInputStream.java:220)
  com.google.common.io.ByteStreams.read(ByteStreams.java:805)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:660)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:641)
  com.google.common.io.Files.toByteArray(Files.java:199)
  org.sonar.core.preview.PreviewCache.fileToByte(PreviewCache.java:133)
  org.sonar.core.preview.PreviewCache.getDatabaseForPreview(PreviewCache.java:95)
  org.sonar.server.ui.JRubyFacade.createDatabaseForPreview(JRubyFacade.java:406)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455)
  org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316)
  org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:61)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  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:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:74)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.ArrayNode.interpretPrimitive(ArrayNode.java:94)
  org.jruby.ast.ArrayNode.interpret(ArrayNode.java:84)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:81)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:39)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:71)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:43)
  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:214)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:66)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:214)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:336)
  org.jruby.runtime.BlockBody.call(BlockBody.java:73)
  org.jruby.runtime.Block.call(Block.java:101)
  org.jruby.RubyProc.call(RubyProc.java:290)
  org.jruby.RubyProc.call(RubyProc.java:224)
  org.jruby.RubyProc$INVOKER$i$0$0$call.call(RubyProc$INVOKER$i$0$0$call.gen)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
  org.jruby.ast.CallNoArgBlockPassNode.interpret(CallNoArgBlockPassNode.java:53)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.RubyClass.finvoke(RubyClass.java:690)
  org.jruby.runtime.Helpers.invoke(Helpers.java:498)
  org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:363)
  org.jruby.javasupport.JavaEmbedUtils$1.callMethod(JavaEmbedUtils.java:143)
  org.jruby.rack.DefaultRackApplication.call(DefaultRackApplication.java:64)
  org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:33)
  org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:66)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.MasterServletFilter.doFilter(MasterServletFilter.java:80)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:42)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.DatabaseSessionFilter.doFilter(DatabaseSessionFilter.java:36)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.ProfilingFilter.doFilter(ProfilingFilter.java:81)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:178)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  java.lang.Thread.run(Thread.java:662)

Looks like the createDatabaseForPreview method of JRubyFacade is trying to read the entire cache database into memory . Can it get changed so that instead of reading all bytes in memory it sends chunk by chunk  instead.

Is it possible to increase the Read TimeOut  period on client side.


Regards,
Prasad P. Khandekar
Sent from Windows Mail

This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from any computer.

Reply | Threaded
Open this post in threaded view
|

Re: OutOfMemoryError while performing preview analysis

Prasad Khandekar
In reply to this post by Freddy Mallet
Hello Freddy,

The changes suggested in my earlier reply worked as expected. It did not cause OutOfMemoryError on the server side. My preview scan wen through without any further problems.

Regards,
Prasad P. Khandekar
Sent from Windows Mail

From: [hidden email]
Sent: ‎Monday‎, ‎12‎ ‎January‎ ‎2015 ‎23‎:‎31
To: [hidden email]

Hello Prasad,

What is the size of this large project because indeed this feature is not yet as scalable as we would like it to be ?

Thanks

-----
SonarQube for Continuous Inspection

On Mon, Jan 12, 2015 at 10:02 AM, Prasad Khandekar <[hidden email]> wrote:
Hello,

For a large project which my cases is creating a preview database of 844756992 & which takes almost 306996ms is generating an ReadTimeout error on client side and on the server side creating OutOfMemory exception. The servier side stack trace is

2015.01.12 01:55:23 ERROR http-bio-0.0.0.0-8080-exec-5 [rails] 
Java::JavaLang::OutOfMemoryError ():
  java.io.FileInputStream.readBytes(Native Method)
  java.io.FileInputStream.read(FileInputStream.java:220)
  com.google.common.io.ByteStreams.read(ByteStreams.java:805)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:660)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:641)
  com.google.common.io.Files.toByteArray(Files.java:199)
  org.sonar.core.preview.PreviewCache.fileToByte(PreviewCache.java:133)
  org.sonar.core.preview.PreviewCache.getDatabaseForPreview(PreviewCache.java:95)
  org.sonar.server.ui.JRubyFacade.createDatabaseForPreview(JRubyFacade.java:406)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455)
  org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316)
  org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:61)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  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:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:74)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.ArrayNode.interpretPrimitive(ArrayNode.java:94)
  org.jruby.ast.ArrayNode.interpret(ArrayNode.java:84)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:81)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:39)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:71)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:43)
  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:214)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:66)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:214)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:336)
  org.jruby.runtime.BlockBody.call(BlockBody.java:73)
  org.jruby.runtime.Block.call(Block.java:101)
  org.jruby.RubyProc.call(RubyProc.java:290)
  org.jruby.RubyProc.call(RubyProc.java:224)
  org.jruby.RubyProc$INVOKER$i$0$0$call.call(RubyProc$INVOKER$i$0$0$call.gen)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
  org.jruby.ast.CallNoArgBlockPassNode.interpret(CallNoArgBlockPassNode.java:53)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.RubyClass.finvoke(RubyClass.java:690)
  org.jruby.runtime.Helpers.invoke(Helpers.java:498)
  org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:363)
  org.jruby.javasupport.JavaEmbedUtils$1.callMethod(JavaEmbedUtils.java:143)
  org.jruby.rack.DefaultRackApplication.call(DefaultRackApplication.java:64)
  org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:33)
  org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:66)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.MasterServletFilter.doFilter(MasterServletFilter.java:80)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:42)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.DatabaseSessionFilter.doFilter(DatabaseSessionFilter.java:36)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.ProfilingFilter.doFilter(ProfilingFilter.java:81)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:178)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  java.lang.Thread.run(Thread.java:662)

Looks like the createDatabaseForPreview method of JRubyFacade is trying to read the entire cache database into memory . Can it get changed so that instead of reading all bytes in memory it sends chunk by chunk  instead.

Is it possible to increase the Read TimeOut  period on client side.


Regards,
Prasad P. Khandekar
Sent from Windows Mail

This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from any computer.

Reply | Threaded
Open this post in threaded view
|

Re: OutOfMemoryError while performing preview analysis

Prasad Khandekar
Here is the patch to resolve OutOfMemory Error on sonar server while performing a PreviewScan.

Regards
Prasad P. Khandekar

From: [hidden email]
Sent: ‎Tuesday‎, ‎13‎ ‎January‎ ‎2015 ‎20‎:‎23
To: [hidden email]

Hello Freddy,

The changes suggested in my earlier reply worked as expected. It did not cause OutOfMemoryError on the server side. My preview scan wen through without any further problems.

Regards,
Prasad P. Khandekar
Sent from Windows Mail

From: [hidden email]
Sent: ‎Monday‎, ‎12‎ ‎January‎ ‎2015 ‎23‎:‎31
To: [hidden email]

Hello Prasad,

What is the size of this large project because indeed this feature is not yet as scalable as we would like it to be ?

Thanks

-----
SonarQube for Continuous Inspection

On Mon, Jan 12, 2015 at 10:02 AM, Prasad Khandekar <[hidden email]> wrote:
Hello,

For a large project which my cases is creating a preview database of 844756992 & which takes almost 306996ms is generating an ReadTimeout error on client side and on the server side creating OutOfMemory exception. The servier side stack trace is

2015.01.12 01:55:23 ERROR http-bio-0.0.0.0-8080-exec-5 [rails] 
Java::JavaLang::OutOfMemoryError ():
  java.io.FileInputStream.readBytes(Native Method)
  java.io.FileInputStream.read(FileInputStream.java:220)
  com.google.common.io.ByteStreams.read(ByteStreams.java:805)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:660)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:641)
  com.google.common.io.Files.toByteArray(Files.java:199)
  org.sonar.core.preview.PreviewCache.fileToByte(PreviewCache.java:133)
  org.sonar.core.preview.PreviewCache.getDatabaseForPreview(PreviewCache.java:95)
  org.sonar.server.ui.JRubyFacade.createDatabaseForPreview(JRubyFacade.java:406)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455)
  org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316)
  org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:61)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  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:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:74)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.ArrayNode.interpretPrimitive(ArrayNode.java:94)
  org.jruby.ast.ArrayNode.interpret(ArrayNode.java:84)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:81)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:39)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:71)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:43)
  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:214)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:66)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:214)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:336)
  org.jruby.runtime.BlockBody.call(BlockBody.java:73)
  org.jruby.runtime.Block.call(Block.java:101)
  org.jruby.RubyProc.call(RubyProc.java:290)
  org.jruby.RubyProc.call(RubyProc.java:224)
  org.jruby.RubyProc$INVOKER$i$0$0$call.call(RubyProc$INVOKER$i$0$0$call.gen)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
  org.jruby.ast.CallNoArgBlockPassNode.interpret(CallNoArgBlockPassNode.java:53)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.RubyClass.finvoke(RubyClass.java:690)
  org.jruby.runtime.Helpers.invoke(Helpers.java:498)
  org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:363)
  org.jruby.javasupport.JavaEmbedUtils$1.callMethod(JavaEmbedUtils.java:143)
  org.jruby.rack.DefaultRackApplication.call(DefaultRackApplication.java:64)
  org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:33)
  org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:66)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.MasterServletFilter.doFilter(MasterServletFilter.java:80)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:42)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.DatabaseSessionFilter.doFilter(DatabaseSessionFilter.java:36)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.ProfilingFilter.doFilter(ProfilingFilter.java:81)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:178)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  java.lang.Thread.run(Thread.java:662)

Looks like the createDatabaseForPreview method of JRubyFacade is trying to read the entire cache database into memory . Can it get changed so that instead of reading all bytes in memory it sends chunk by chunk  instead.

Is it possible to increase the Read TimeOut  period on client side.


Regards,
Prasad P. Khandekar
Sent from Windows Mail

This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from any computer.



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

PreviewCache.java.patch (1K) Download Attachment
JRubyFacade.java.patch (218 bytes) Download Attachment
batch_bootstrap_controller.rb.patch (532 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OutOfMemoryError while performing preview analysis

Simon Brandhof
Hi Prasad,

Thanks for the patch. It's being applied in version 5.1 and will probably be backported in 4.5.3.

Best regards


Simon BRANDHOF | SonarSource
http://twitter.com/SimonBrandhof

On 13 January 2015 at 19:09, Prasad Khandekar <[hidden email]> wrote:
Here is the patch to resolve OutOfMemory Error on sonar server while performing a PreviewScan.

Regards
Prasad P. Khandekar

From: [hidden email]
Sent: ‎Tuesday‎, ‎13‎ ‎January‎ ‎2015 ‎20‎:‎23
To: [hidden email]

Hello Freddy,

The changes suggested in my earlier reply worked as expected. It did not cause OutOfMemoryError on the server side. My preview scan wen through without any further problems.

Regards,
Prasad P. Khandekar
Sent from Windows Mail

From: [hidden email]
Sent: ‎Monday‎, ‎12‎ ‎January‎ ‎2015 ‎23‎:‎31
To: [hidden email]

Hello Prasad,

What is the size of this large project because indeed this feature is not yet as scalable as we would like it to be ?

Thanks

-----
SonarQube for Continuous Inspection

On Mon, Jan 12, 2015 at 10:02 AM, Prasad Khandekar <[hidden email]> wrote:
Hello,

For a large project which my cases is creating a preview database of 844756992 & which takes almost 306996ms is generating an ReadTimeout error on client side and on the server side creating OutOfMemory exception. The servier side stack trace is

2015.01.12 01:55:23 ERROR http-bio-0.0.0.0-8080-exec-5 [rails] 
Java::JavaLang::OutOfMemoryError ():
  java.io.FileInputStream.readBytes(Native Method)
  java.io.FileInputStream.read(FileInputStream.java:220)
  com.google.common.io.ByteStreams.read(ByteStreams.java:805)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:660)
  com.google.common.io.ByteStreams.readFully(ByteStreams.java:641)
  com.google.common.io.Files.toByteArray(Files.java:199)
  org.sonar.core.preview.PreviewCache.fileToByte(PreviewCache.java:133)
  org.sonar.core.preview.PreviewCache.getDatabaseForPreview(PreviewCache.java:95)
  org.sonar.server.ui.JRubyFacade.createDatabaseForPreview(JRubyFacade.java:406)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455)
  org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316)
  org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:61)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  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:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:74)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.ArrayNode.interpretPrimitive(ArrayNode.java:94)
  org.jruby.ast.ArrayNode.interpret(ArrayNode.java:84)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:56)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:81)
  org.jruby.RubyClass.finvoke(RubyClass.java:527)
  org.jruby.RubyBasicObject.send(RubyBasicObject.java:2590)
  org.jruby.RubyKernel.send(RubyKernel.java:2223)
  org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
  org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:39)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:268)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:230)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:71)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
  org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:43)
  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:214)
  org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:66)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:214)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:336)
  org.jruby.runtime.BlockBody.call(BlockBody.java:73)
  org.jruby.runtime.Block.call(Block.java:101)
  org.jruby.RubyProc.call(RubyProc.java:290)
  org.jruby.RubyProc.call(RubyProc.java:224)
  org.jruby.RubyProc$INVOKER$i$0$0$call.call(RubyProc$INVOKER$i$0$0$call.gen)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
  org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:384)
  org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
  org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:229)
  org.jruby.runtime.Block.yieldSpecific(Block.java:111)
  org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
  org.jruby.ast.CallNoArgBlockPassNode.interpret(CallNoArgBlockPassNode.java:53)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:118)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:161)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:190)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316)
  org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145)
  org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
  org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.ToAryNode.interpret(ToAryNode.java:69)
  org.jruby.ast.MultipleAsgnNode.interpret(MultipleAsgnNode.java:127)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.IfNode.interpret(IfNode.java:116)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  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:198)
  org.jruby.RubyClass.finvoke(RubyClass.java:690)
  org.jruby.runtime.Helpers.invoke(Helpers.java:498)
  org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:363)
  org.jruby.javasupport.JavaEmbedUtils$1.callMethod(JavaEmbedUtils.java:143)
  org.jruby.rack.DefaultRackApplication.call(DefaultRackApplication.java:64)
  org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:33)
  org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:66)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.MasterServletFilter.doFilter(MasterServletFilter.java:80)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:42)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.user.DatabaseSessionFilter.doFilter(DatabaseSessionFilter.java:36)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.sonar.server.platform.ProfilingFilter.doFilter(ProfilingFilter.java:81)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:178)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  java.lang.Thread.run(Thread.java:662)

Looks like the createDatabaseForPreview method of JRubyFacade is trying to read the entire cache database into memory . Can it get changed so that instead of reading all bytes in memory it sends chunk by chunk  instead.

Is it possible to increase the Read TimeOut  period on client side.


Regards,
Prasad P. Khandekar
Sent from Windows Mail

This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from any computer.



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email