opensensorhub / osh-core

OpenSensorHub Core Modules
http://docs.opensensorhub.org
Mozilla Public License 2.0
32 stars 16 forks source link

Update Jetty version to fix memory leak while using WebSocket #173

Closed mdhsl closed 3 years ago

mdhsl commented 3 years ago

Memory leak happens while using WebSocket Service. Related to #172

mdhsl commented 3 years ago

The memory leak appears when using the WebSocket service only. After investigation, we see that the listener of Jetty maintains a reference to the SOSWebSocketOut object which prevents it from being GC.

Next: https://stackoverflow.com/questions/55829525/potential-memory-leak-of-websocket-sessions-in-jetty-9-4-15

and updating Jetty to version 9.4.42.v20210604, the memory leak has gone.

The solution is simply to update Jetty

image