adamtool / webinterface

The web interface for the tool Adam (AdamMC and AdamSYNT) providing an intuitive, visual definition of Petri nets with transits and Petri games, and an interactive interface to the algorithms of AdamMC and AdamSYNT. Contains the repos (as submodules): libs, framework, logics, modelchecking, examples, synthesizer, high-level, webinterface-backend.
http://adam.informatik.uni-oldenburg.de:4567/
GNU General Public License v3.0
5 stars 2 forks source link

Client should send a heartbeat to the server to prevent the websocket from timing out #33

Closed annyanich closed 4 years ago

annyanich commented 4 years ago

I found out that websockets do not have their own heartbeat built in and actually do timeout and close if no data is sent over them for too long. This is mostly harmless at the moment, because the client is already set up to automatically reconnect if its websocket closes for any reason (be it inactivity, an internet outage, or anything else like that), but it would be better not to have the connection break and re-open every 300 seconds.

org.eclipse.jetty.websocket.api.CloseException: java.util.concurrent.TimeoutException: Idle timeout expired: 300000/300000 ms at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onReadTimeout(AbstractWebSocketConnection.java:492) at org.eclipse.jetty.io.AbstractConnection.onFillInterestedFailed(AbstractConnection.java:170) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillInterestedFailed(AbstractWebSocketConnection.java:465) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.failed(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.onFail(FillInterest.java:138) at org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:406) at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166) at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 300000/300000 ms ... 8 more OnWebSocketError. Error cause stack trace: java.util.concurrent.TimeoutException: Idle timeout expired: 300000/300000 ms at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166) at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)