{"action":"opened","issue":{"url":"https://api.github.com/repos/knoldus/play-reactive-slick/issues/1","labels_url":"https://api.github.com/repos/knoldus/play-reactive-slick/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/knoldus/play-reactive-slick/issues/1/comments","events_url":"https://api.github.com/repos/knoldus/play-reactive-slick/issues/1/events","html_url":"https://github.com/knoldus/play-reactive-slick/issues/1","id":64001113,"number":1,"title":"java.lang.OutOfMemoryError: unable to create new native thread","user":{"login":"mblund","id":506762,"avatar_url":"https://avatars.githubusercontent.com/u/506762?v=3","gravatar_id":"","url":"https://api.github.com/users/mblund","html_url":"https://github.com/mblund","followers_url":"https://api.github.com/users/mblund/followers","following_url":"https://api.github.com/users/mblund/following{/other_user}","gists_url":"https://api.github.com/users/mblund/gists{/gist_id}","starred_url":"https://api.github.com/users/mblund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblund/subscriptions","organizations_url":"https://api.github.com/users/mblund/orgs","repos_url":"https://api.github.com/users/mblund/repos","events_url":"https://api.github.com/users/mblund/events{/privacy}","received_events_url":"https://api.github.com/users/mblund/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-24T13:57:41Z","updated_at":"2015-03-24T13:57:41Z","closed_at":null,"body":"I tried to load test the application with \r\n```\r\nab -n 1000 -c 5 http://localhost:9000/employees                    ~\r\nThis is ApacheBench, Version 2.3 <$Revision: 1554214 $>\r\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\r\nLicensed to The Apache Software Foundation, http://www.apache.org/\r\n\r\nBenchmarking localhost (be patient)\r\nCompleted 100 requests\r\nCompleted 200 requests\r\nCompleted 300 requests\r\nCompleted 400 requests\r\nCompleted 500 requests\r\nCompleted 600 requests\r\nCompleted 700 requests\r\nCompleted 800 requests\r\nCompleted 900 requests\r\napr_socket_recv: Connection refused (61)\r\nTotal of 992 requests completed\r\n```\r\n\r\nbut I got an out of memory exception after ~1000 request\r\n\r\n```\r\nUncaught error from thread [play-akka.actor.default-dispatcher-3] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[Uncaught error from thread [play-akka.actor.default-dispatcher-4] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[play]\r\nUncaught error from thread [play-akka.actor.default-dispatcher-6] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[play]\r\nUncaught error from thread [play-akka.actor.default-dispatcher-2] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[play]\r\nplay]\r\njava.lang.OutOfMemoryError: unable to create new native thread\r\n\tat java.lang.Thread.start0(Native Method)\r\n\tat java.lang.Thread.start(Thread.java:713)\r\n\tat java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)\r\n\tat java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1360)\r\n\tat scala.concurrent.impl.ExecutionContextImpl$$anon$1.execute(ExecutionContextImpl.scala:136)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runSynchronousDatabaseAction(DatabaseComponent.scala:208)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runSynchronousDatabaseAction(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runInContext(DatabaseComponent.scala:185)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runInContext(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runInternal(DatabaseComponent.scala:63)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runInternal(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.run(DatabaseComponent.scala:60)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.run(JdbcBackend.scala:36)\r\n[ERROR] [03/24/2015 14:47:57.322] [play-akka.actor.default-dispatcher-4] [ActorSystem(play)] Uncaught error from thread [play-akka.actor.default-dispatcher-4] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled\r\njava.lang.OutOfMemoryError: unable to create new native thread\r\n\tat java.lang.Thread.start0(Native Method)\r\n\tat java.lang.Thread.start(Thread.java:713)\r\n\tat java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)\r\n\tat java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1360)\r\n\tat scala.concurrent.impl.ExecutionContextImpl$$anon$1.execute(ExecutionContextImpl.scala:136)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runSynchronousDatabaseAction(DatabaseComponent.scala:208)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runSynchronousDatabaseAction(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runInContext(DatabaseComponent.scala:185)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runInContext(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runInternal(DatabaseComponent.scala:63)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runInternal(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.run(DatabaseComponent.scala:60)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.run(JdbcBackend.scala:36)\r\n\tat models.DAO$.count(DAO.scala:36)\r\n\tat models.DAO$.list(DAO.scala:84)\r\n\tat controllers.Application$$anonfun$list$1.apply(Application.scala:44)\r\n\tat controllers.Application$$anonfun$list$1.apply(Application.scala:43)\r\n\tat play.api.mvc.Action$.invokeBlock(Action.scala:556)\r\n\tat play.api.mvc.Action$.invokeBlock(Action.scala:555)\r\n\tat play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:518)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)\r\n\tat play.utils.Threads$.withContextClassLoader(Threads.scala:21)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:129)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:128)\r\n\tat scala.Option.map(Option.scala:145)\r\n\tat play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:128)\r\n\tat play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:121)\r\n\tat play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:705)\r\n\tat play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:705)\r\n\tat scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)\r\n\tat scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)\r\n\tat akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)\r\n\tat akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)\r\n\tat scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\r\n\tat scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\r\n\tat models.DAO$.count(DAO.scala:36)\r\n\tat models.DAO$.list(DAO.scala:84)\r\n\tat controllers.Application$$anonfun$list$1.apply(Application.scala:44)\r\n\tat controllers.Application$$anonfun$list$1.apply(Application.scala:43)\r\n\tat play.api.mvc.Action$.invokeBlock(Action.scala:556)\r\n\tat play.api.mvc.Action$.invokeBlock(Action.scala:555)\r\n\tat play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:518)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)\r\n\r\n\tat play.utils.Threads$.withContextClassLoader(Threads.scala:21)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:129)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:128)\r\n\tat scala.Option.map(Option.scala:145)\r\n\tat play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:128)\r\n\tat play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:121)\r\n\tat play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:705)\r\n\tat play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:705)\r\n\tat scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)\r\n[ERROR] [03/24/2015 14:47:57.322] [play-akka.actor.default-dispatcher-6] [ActorSystem(play)] Uncaught error from thread [play-akka.actor.default-dispatcher-6] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled\r\njava.lang.OutOfMemoryError: unable to create new native thread\r\n\tat java.lang.Thread.start0(Native Method)\r\n\tat java.lang.Thread.start(Thread.java:713)\r\n\tat java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)\r\n\tat java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1360)\r\n\tat scala.concurrent.impl.ExecutionContextImpl$$anon$1.execute(ExecutionContextImpl.scala:136)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runSynchronousDatabaseAction(DatabaseComponent.scala:208)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runSynchronousDatabaseAction(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runInContext(DatabaseComponent.scala:185)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runInContext(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runInternal(DatabaseComponent.scala:63)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runInternal(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.run(DatabaseComponent.scala:60)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.run(JdbcBackend.scala:36)\r\n\tat models.DAO$.count(DAO.scala:36)\r\n\tat models.DAO$.list(DAO.scala:84)\r\n\tat controllers.Application$$anonfun$list$1.apply(Application.scala:44)\r\n\tat controllers.Application$$anonfun$list$1.apply(Application.scala:43)\r\n\tat play.api.mvc.Action$.invokeBlock(Action.scala:556)\r\n\tat play.api.mvc.Action$.invokeBlock(Action.scala:555)\r\n\tat play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:518)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)\r\n\tat play.utils.Threads$.withContextClassLoader(Threads.scala:21)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:129)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:128)\r\n\tat scala.Option.map(Option.scala:145)\r\n\tat play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:128)\r\n\tat play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:121)\r\n\tat play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:705)\r\n\tat play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:705)\r\n\tat scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)\r\n\tat scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)\r\n\tat akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)\r\n\tat akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)\r\n\tat scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\r\n\tat scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\r\n\tat scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)\r\n\r\n\tat akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)\r\n\tat akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)\r\n\tat scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\r\n\tat scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\r\njava.lang.OutOfMemoryError: unable to create new native thread\r\n\tat java.lang.Thread.start0(Native Method)\r\n\tat java.lang.Thread.start(Thread.java:713)\r\n\tat java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)\r\n\tat java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1360)\r\n\tat scala.concurrent.impl.ExecutionContextImpl$$anon$1.execute(ExecutionContextImpl.scala:136)[ERROR] [03/24/2015 14:47:57.322] [play-akka.actor.default-dispatcher-3] [ActorSystem(play)] Uncaught error from thread [play-akka.actor.default-dispatcher-3] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled\r\njava.lang.OutOfMemoryError: unable to create new native thread\r\n\tat java.lang.Thread.start0(Native Method)\r\n\tat java.lang.Thread.start(Thread.java:713)\r\n\tat java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)\r\n\tat java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1360)\r\n\tat scala.concurrent.impl.ExecutionContextImpl$$anon$1.execute(ExecutionContextImpl.scala:136)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runSynchronousDatabaseAction(DatabaseComponent.scala:208)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runSynchronousDatabaseAction(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runInContext(DatabaseCompone\r\nnt.scala:185)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runInContext(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.runInternal(DatabaseComponent.scala:63)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.runInternal(JdbcBackend.scala:36)\r\n\tat slick.backend.DatabaseComponent$DatabaseDef$class.run(DatabaseComponent.scala:60)\r\n\tat slick.jdbc.JdbcBackend$DatabaseDef.run(JdbcBackend.scala:36)\r\n\tat models.DAO$.count(DAO.scala:36)\r\n\tat models.DAO$.list(DAO.scala:84)\r\n\tat controllers.Application$$anonfun$list$1.apply(Application.scala:44)\r\n\tat controllers.Application$$anonfun$list$1.apply(Application.scala:43)\r\n\tat play.api.mvc.Action$.invokeBlock(Action.scala:556)\r\n\tat play.api.mvc.Action$.invokeBlock(Action.scala:555)\r\n\tat play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:518)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)\r\n\tat play.utils.Threads$.withContextClassLoader(Threads.scala:21)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:129)\r\n\tat play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:128)\r\n\tat scala.Option.map(Option.scala:145)\r\n\tat play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:128)\r\n\tat play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:121)\r\n\tat play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:705)\r\n\tat play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:705)\r\n\tat scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)\r\n\tat scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)\r\n\tat akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)\r\n\tat akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)\r\n\tat scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\r\n\tat scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\r\n\r\n```\r\n\r\n\r\nHave you seen this problem and do you have a clue why its happening?\r\n\r\n"}}