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

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

问题描述

我正在使用任一

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升级到了激活器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 ,如下所示:

Set this to false as follows :

fork in run := false

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

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