为什么播放框架超时? [英] why is play framework timing out?

查看:21
本文介绍了为什么播放框架超时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用任一命令行从命令行启动应用程序

I am starting the the application from the command line using either

    activator run 
    activator ~run

或者在我启动激活器控制台后,我使用 run 或 ~run.
一切似乎都在工作,它给出了预期的

or after I start the activator console I use run or ~run.
everything seems to work and it gives the expected

 --- (Running the application, auto-reloading is enabled) ---

   play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

   (Server started, use Ctrl+D to stop and go back to the console...)

我可以在浏览器中查看应用程序,我可以对代码进行更改,然后重新加载它们就好了.问题是,仅仅几分钟后,它看起来像是超时",因为如果我在此之后尝试重新加载,浏览器就会坐在那里旋转.如果我让它旋转足够长的时间,我就会得到.

I can view the application in the browser and I can make changes in the code and they are reloaded just fine. the issue is that after only a couple minutes it seems like something "times-out" because if I try to reload after this the browser just sits there spinning. if i let it spin long enough I get.

[error] application - 
[info] 
[info] ! Internal server error, for (GET) [/] ->
[info] 
[info] java.util.concurrent.TimeoutException: Futures timed out after [300000 milliseconds]
[info]  at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219) ~[scala-library-2.11.1.jar:na]
[info]  at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223) ~[scala-library-2.11.1.jar:na]
[info]  at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:111) ~[scala-library-2.11.1.jar:na]
[info]  at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53) ~[scala-library-2.11.1.jar:na]
[info]  at scala.concurrent.Await$.result(package.scala:111) ~[scala-library-2.11.1.jar:na]

我真的很感激任何帮助.由于每次我进行更改时都必须重新启动应用程序,这确实削弱了框架的吸引力.

I would really appreciate any help. Since having to restart the app all over again each time I make a change really takes away the appeal of the framework.

推荐答案

我用 Play 2.3.9 升级到 activator 1.3.2,我也遇到了同样的问题.它把我逼疯了.我发现原因是在激活器 1.3.2 中添加了新的fork in run"设置.

I upgraded to activator 1.3.2 with Play 2.3.9 and I also had the same issue. It drove me nuts. I found that the cause was the new set "fork in run" setting added in activator 1.3.2.

打开build.sbt,你会发现:

Open up build.sbt and you will find :

fork in run := true

将其设置为 false 如下:

fork in run := false

这篇关于为什么播放框架超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆