2010-04-29 5 views
0

J'utilise AppEngine JRuby on Rails (SDK version 1.3.3.1) - un problème que je rencontre souvent est qu'après quelques requêtes le serveur devient vraiment lent, jusqu'à ce qu'il meurt et jette OutOfMemoryError sur le terminal (OSX).AppEngine JRuby - OutOfMemoryError: espace de tas Java - peut-il être résolu?

Les demandes elles-mêmes sont très légères, ne recherchent pas plus qu'une entité ou ne l'enregistrent pas, en utilisant DataMapper.

Sur appspot, ce problème ne se produit pas.

Existe-t-il un moyen d'agrandir l'espace de tas pour JRuby?

Le journal d'exception:

Exception in thread "Timer-2" java.lang.OutOfMemoryError: Java heap space 
Apr 29, 2010 8:08:22 AM com.google.apphosting.utils.jetty.JettyLogger warn 
WARNING: Error for /users/close_users 
java.lang.OutOfMemoryError: Java heap space 
    at org.jruby.RubyHash.internalPut(RubyHash.java:480) 
    at org.jruby.RubyHash.internalPut(RubyHash.java:461) 
    at org.jruby.RubyHash.fastASet(RubyHash.java:837) 
    at org.jruby.RubyArray.makeHash(RubyArray.java:2998) 
    at org.jruby.RubyArray.makeHash(RubyArray.java:2992) 
    at org.jruby.RubyArray.op_diff(RubyArray.java:3103) 
    at org.jruby.RubyArray$i_method_1_0$RUBYINVOKER$op_diff.call(org/jruby/RubyArray$i_method_1_0$RUBYINVOKER$op_diff.gen) 
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:146) 
    at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) 
    at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) 
    at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) 
    at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) 
    at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373) 
    at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:346) 
    at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303) 
    at org.jruby.runtime.Block.yield(Block.java:194) 
    at org.jruby.RubyArray.collect(RubyArray.java:2354) 
    at org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$collect.call(org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$collect.gen) 
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:115) 
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122) 
    at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64) 
    at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61) 
    at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) 
    at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) 
    at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) 
    at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:98) 
    at org.jruby.ast.BeginNode.interpret(BeginNode.java:83) 
    at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) 
    at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) 
    at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96) 
    at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:201) 
    at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:183) 

Répondre

-1

mis -XX:MaxHeapSize et -Xmx paramètres vm

+0

de Merci, pouvez-vous s'il vous plaît être plus précis sur la façon de le faire? – elado

+0

OK ressemble à dev_appserver.rb. --jvm_flag = -Xmx1024m est la solution. – elado

Questions connexes