provegard / ncdbg

A debugger for Nashorn that uses Chrome DevTools as frontend
BSD 3-Clause "New" or "Revised" License
31 stars 5 forks source link

Websocket timeout #13

Closed provegard closed 7 years ago

provegard commented 7 years ago

Either increase the timeout (akka.http.server.idle-timeout) or inject keep-alive messages.

.keepAlive(30.seconds, () => TextMessage("keepalive"))

However, DevTools doesn't expect keep-alive messages. We could send a console message of course.

provegard commented 7 years ago

Also prevent the following dead letter logging on timeout:

[INFO] [02/23/2017 09:46:11.994] [default-akka.actor.default-dispatcher-9] [akka://default/user/StreamSupervisor-0/flow-2-1-actorRefSource] Message [akka.actor.Status$Success] from Actor[akka://default/user/$a#-2138426620] to Actor[akka://default/user/StreamSupervisor-0/flow-2-1-actorRefSource#-680500035] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[INFO] [02/23/2017 09:46:12.005] [default-akka.actor.default-dispatcher-4] [akka://default/user/Debugger-domact2] Message [com.programmaticallyspeaking.ncd.host.Resumed$] from Actor[akka://default/user/Debugger-domact2#-965655214] to Actor[akka://default/user/Debugger-domact2#-965655214] was not delivered. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
provegard commented 7 years ago

The timeout can be configured in application.conf, e.g.:

akka.http {
  server {
    idle-timeout = 10s
  }
}

But this should be in an application config file instead, and the default should be something like 2 minutes.