Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

OOM 발생 문의드립니다. #994

Open
BongChan opened this issue Nov 11, 2015 · 6 comments
Open

OOM 발생 문의드립니다. #994

BongChan opened this issue Nov 11, 2015 · 6 comments
Labels

Comments

@BongChan
Copy link

안녕하세요.
요비를 감사하게 사용하고 있습니다.

헌데, 2달정도에 한번씩 아래 로그와같이 OOM이 발생하여 문의드립니다.
메모리 문제로 예상되어 아래와 같이 메모리도 여유있게 잡아 주고 있습니다.

혹시 의심가는 부분 알려주시면 정말 감사하겠습니다.

_JAVA_OPTIONS="-Xmx4096m -Xms1024m" activator "start -Dhttp.port=9000"
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
CentOS release 6.6 (Final) 2.6.32-431.20.3.el6.x86_64

-- 로그 --
2015-11-11 14:32:33,776 - [ERROR] - from akka.actor.ActorSystemImpl in play-akka.actor.default-dispatcher-11098
Uncaught error from thread [play-akka.actor.default-dispatcher-11090] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367) ~[na:1.7.0_60]
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130) ~[na:1.7.0_60]
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114) ~[na:1.7.0_60]
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:587) ~[na:1.7.0_60]
at java.lang.StringBuilder.append(StringBuilder.java:214) ~[na:1.7.0_60]
at scala.collection.mutable.StringBuilder.append(StringBuilder.scala:264) ~[org.scala-lang.scala-library-2.10.4.jar:na]
at scala.collection.mutable.StringBuilder.$plus$eq(StringBuilder.scala:172) ~[org.scala-lang.scala-library-2.10.4.jar:na]
at play.twirl.api.HtmlFormat$$anonfun$escape$1.apply(Formats.scala:69) ~[com.typesafe.play.twirl-api_2.10-1.0.3.jar:1.0.3]
at play.twirl.api.HtmlFormat$$anonfun$escape$1.apply(Formats.scala:63) ~[com.typesafe.play.twirl-api_2.10-1.0.3.jar:1.0.3]
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) ~[org.scala-lang.scala-library-2.10.4.jar:na]
at scala.collection.immutable.StringOps.foreach(StringOps.scala:31) ~[org.scala-lang.scala-library-2.10.4.jar:na]
at play.twirl.api.HtmlFormat$.escape(Formats.scala:63) ~[com.typesafe.play.twirl-api_2.10-1.0.3.jar:1.0.3]
at play.twirl.api.HtmlFormat$.escape(Formats.scala:49) ~[com.typesafe.play.twirl-api_2.10-1.0.3.jar:1.0.3]
at play.twirl.api.BaseScalaTemplate.display(BaseScalaTemplate.scala:13) ~[com.typesafe.play.twirl-api_2.10-1.0.3.jar:1.0.3]
at views.html.code.svnDiff$.apply(svnDiff.template.scala:135) ~[yobi.yobi-0.8.2.jar:0.8.2]
at views.html.code.svnDiff$.render(svnDiff.template.scala:232) ~[yobi.yobi-0.8.2.jar:0.8.2]
at views.html.code.svnDiff.render(svnDiff.template.scala) ~[yobi.yobi-0.8.2.jar:0.8.2]
at controllers.CodeHistoryApp.show(CodeHistoryApp.java:133) ~[yobi.yobi-0.8.2.jar:0.8.2]
at Routes$$anonfun$routes$1$$anonfun$applyOrElse$187$$anonfun$apply$187.apply(routes_routing.scala:3038) ~[yobi.yobi-0.8.2.jar:na]
at Routes$$anonfun$routes$1$$anonfun$applyOrElse$187$$anonfun$apply$187.apply(routes_routing.scala:3038) ~[yobi.yobi-0.8.2.jar:na]
at play.core.Router$HandlerInvokerFactory$$anon$4.resultCall(Router.scala:264) ~[com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
at play.core.Router$HandlerInvokerFactory$JavaActionInvokerFactory$$anon$15$$anon$1.invocation(Router.scala:255) ~[com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:55) ~[com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
at Global$1.call(Global.java:190) ~[yobi.yobi-0.8.2.jar:na]
at actions.AnonymousCheckAction.call(AnonymousCheckAction.java:57) ~[yobi.yobi-0.8.2.jar:0.8.2]
at actions.IsAllowedAction.call(IsAllowedAction.java:69) ~[yobi.yobi-0.8.2.jar:0.8.2]
at actions.AbstractProjectCheckAction.call(AbstractProjectCheckAction.java:80) ~[yobi.yobi-0.8.2.jar:0.8.2]
at play.core.j.JavaAction$$anonfun$11.apply(JavaAction.scala:82) ~[com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
at play.core.j.JavaAction$$anonfun$11.apply(JavaAction.scala:82) ~[com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) ~[org.scala-lang.scala-library-2.10.4.jar:na]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) ~[org.scala-lang.scala-library-2.10.4.jar:na]
at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:40) ~[com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
2015-11-11 14:32:38,325 - [WARN] - from application in application-akka.actor.default-dispatcher-279
Failed!! User uploaded temporary files clean-up action failed!
javax.persistence.PersistenceException: org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-176]
at com.avaje.ebeaninternal.server.transaction.TransactionManager.createQueryTransaction(TransactionManager.java:338) ~[org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServer.createQueryTransaction(DefaultServer.java:2067) ~[org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar:na]
at com.avaje.ebeaninternal.server.core.OrmQueryRequest.initTransIfRequired(OrmQueryRequest.java:176) ~[org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServer.findList(DefaultServer.java:1501) ~[org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar:na]
at com.avaje.ebeaninternal.server.querydefn.DefaultOrmQuery.findList(DefaultOrmQuery.java:890) ~[org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar:na]
at com.avaje.ebeaninternal.util.DefaultExpressionList.findList(DefaultExpressionList.java:173) ~[org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar:na]
at models.Attachment$3.removeUserTemporaryFiles(Attachment.java:461) ~[yobi.yobi-0.8.2.jar:0.8.2]
at models.Attachment$3.run(Attachment.java:453) ~[yobi.yobi-0.8.2.jar:0.8.2]
at akka.actor.LightArrayRevolverScheduler$$anon$2$$anon$1.run(Scheduler.scala:242) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.LightArrayRevolverScheduler$TaskHolder.run(Scheduler.scala:476) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.LightArrayRevolverScheduler$$anonfun$close$1.apply(Scheduler.scala:282) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.LightArrayRevolverScheduler$$anonfun$close$1.apply(Scheduler.scala:281) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at scala.collection.Iterator$class.foreach(Iterator.scala:727) [org.scala-lang.scala-library-2.10.4.jar:na]
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) [org.scala-lang.scala-library-2.10.4.jar:na]
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) [org.scala-lang.scala-library-2.10.4.jar:na]
at scala.collection.AbstractIterable.foreach(Iterable.scala:54) [org.scala-lang.scala-library-2.10.4.jar:na]
at akka.actor.LightArrayRevolverScheduler.close(Scheduler.scala:280) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl.stopScheduler(ActorSystem.scala:687) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$$anonfun$liftedTree2$1$1.apply$mcV$sp(ActorSystem.scala:616) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$$anonfun$liftedTree2$1$1.apply(ActorSystem.scala:616) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$$anonfun$liftedTree2$1$1.apply(ActorSystem.scala:616) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$$anon$3.run(ActorSystem.scala:640) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$TerminationCallbacks$$anonfun$run$1.runNext$1(ActorSystem.scala:807) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$TerminationCallbacks$$anonfun$run$1.apply$mcV$sp(ActorSystem.scala:810) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$TerminationCallbacks$$anonfun$run$1.apply(ActorSystem.scala:803) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$TerminationCallbacks$$anonfun$run$1.apply(ActorSystem.scala:803) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.util.ReentrantGuard.withGuard(LockUtil.scala:15) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$TerminationCallbacks.run(ActorSystem.scala:803) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$$anonfun$terminationCallbacks$1.apply(ActorSystem.scala:637) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorSystemImpl$$anonfun$terminationCallbacks$1.apply(ActorSystem.scala:637) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [org.scala-lang.scala-library-2.10.4.jar:na]
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) [org.scala-lang.scala-library-2.10.4.jar:na]
at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) [com.typesafe.akka.akka-actor_2.10-2.3.4.jar:na]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [org.scala-lang.scala-library-2.10.4.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [org.scala-lang.scala-library-2.10.4.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [org.scala-lang.scala-library-2.10.4.jar:na]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [org.scala-lang.scala-library-2.10.4.jar:na]
Caused by: org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) ~[com.h2database.h2-1.3.176.jar:1.3.176]
at org.h2.message.DbException.get(DbException.java:178) ~[com.h2database.h2-1.3.176.jar:1.3.176]
at org.h2.message.DbException.get(DbException.java:154) ~[com.h2database.h2-1.3.176.jar:1.3.176]
at org.h2.message.DbException.get(DbException.java:143) ~[com.h2database.h2-1.3.176.jar:1.3.176]
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1468) ~[com.h2database.h2-1.3.176.jar:1.3.176]
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1443) ~[com.h2database.h2-1.3.176.jar:1.3.176]
at org.h2.jdbc.JdbcConnection.setAutoCommit(JdbcConnection.java:427) ~[com.h2database.h2-1.3.176.jar:1.3.176]
at com.jolbox.bonecp.ConnectionHandle.setAutoCommit(ConnectionHandle.java:1292) ~[com.jolbox.bonecp-0.8.0.RELEASE.jar:na]
at play.api.db.BoneCPApi$$anon$1.onCheckOut(DB.scala:329) ~[com.typesafe.play.play-jdbc_2.10-2.3.6.jar:2.3.6]
at com.jolbox.bonecp.AbstractConnectionStrategy.postConnection(AbstractConnectionStrategy.java:75) ~[com.jolbox.bonecp-0.8.0.RELEASE.jar:na]
at com.jolbox.bonecp.AbstractConnectionStrategy.getConnection(AbstractConnectionStrategy.java:92) ~[com.jolbox.bonecp-0.8.0.RELEASE.jar:na]
at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:553) ~[com.jolbox.bonecp-0.8.0.RELEASE.jar:na]
at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:131) ~[com.jolbox.bonecp-0.8.0.RELEASE.jar:na]
at play.db.ebean.EbeanPlugin$WrappingDatasource.getConnection(EbeanPlugin.java:157) ~[com.typesafe.play.play-java-ebean_2.10-2.3.6.jar:2.3.6]
at com.avaje.ebeaninternal.server.transaction.TransactionManager.createQueryTransaction(TransactionManager.java:312) ~[org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar:na]
... 42 common frames omitted

@jjhangu
Copy link

jjhangu commented Nov 12, 2015

제가 있는곳은 하나의 yobi 서버에 50명정도 사용하는데 사용량이 많아서 그런지 메모리 부족이 자주 떠서 차선책으로 crontab으로 shell script설정해서 하루 2번 yobi재시작해주고 있어요..

@doortts
Copy link
Contributor

doortts commented Nov 19, 2015

@BongChan @jjhangu 사용하시는 버전은 어떻게 되세요?

@jjhangu
Copy link

jjhangu commented Nov 20, 2015

@doortts 제가 사용하고 있는 버전은 0.8.2 입니다

@BongChan
Copy link
Author

@doortts 0.8.2입니다
@jjhangu 답변 감사합니다!! 한번 적용해봐야겠네요 👍

@doortts
Copy link
Contributor

doortts commented Nov 20, 2015

음.. 어딘가 메모리 누수가 있을 수도 있을것 같긴 한데요..
한번 "-Xmx4096m -Xms1024m" 를 "-Xmx4096m -Xms4096m" 으로 맞춰봐주시겠어요?

@jjhangu 하루 2번이라뇨.. 으윽.. 시스템 메모리가 어떻게 되세요? 그리고 메모리 설정은 어떻게 맞춰 놓으셨어요?

@jjhangu
Copy link

jjhangu commented Nov 21, 2015

@doortts 서버 사양이 좋지 않아서 -Xmx2048m -Xms1024m 로 맞추어 놓은 상태입니다.
나중에 서버 이전하면 사양을 더 올리려고요.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants