Why does game 2.6 close the website after 85 seconds when it is idle? Until game 2.5 is

After updating to play 2.6, I noticed that the connection to websocket closes after 85 seconds when it does not work. In game 2.5, however, the network connection remains open for +15 minutes when idle.

What has changed in game 2.6 and is there a way to keep the web memory connection in game 2.6 without manually maintaining the connection at the application level?

+4
source share
1 answer

It seems that for Play 2.6, the backend is using http alc, not netty. This means that the akka HTTP server has a default timeout setting.

- , applications.conf.

play.server.http.idleTimeout = 180s

:

. dev, run, application.conf . , dev , .

, idleTimeout , :

sbt run -Dplay.server.http.idleTimeout=180s

.

https://www.playframework.com/documentation/2.6.x/SettingsAkkaHttp
http://doc.akka.io/docs/akka-http/current/java/http/server-side/websocket-support.html

+8

Source: https://habr.com/ru/post/1680596/


All Articles