"Jetty request 5905542 failed: null" causes OH2 to freeze. Getting to be a real problem

Tonight I had a spectacular crash again. It could have started at 3:00 AM. The log is missing for the early phase but this is one of the log messages that appeared:

Caused by: java.lang.OutOfMemoryError: Java heap space

2018-12-15 03:00:39.261 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 11248870 failed: HttpConnectionOverHTTP@364ff325(l:/127.0.0.1:60850 <-> r:localhost/127.0.0.1:8080,closed=false)[HttpChannelOverHTTP@32165ec3(exchange=HttpExchange@44f2f639 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@3135e416(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@78aaffce{s=START}],recv=HttpReceiverOverHTTP@78ca465e(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of 0}]]]

2018-12-15 03:00:39.259 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - 

java.lang.OutOfMemoryError: Java heap space

Could this be related to the fact that myOpenHAB went off-line for maintenance around the same time?
I have now uninstalled the CloudConnector binding and will wait to see what happens.

I have also recently installed a reverse proxy (nginx) with encryption (https) and authentication for remote access like you. Only issue there is that grafana graphs are not visible since they are on a different port. I might have to change to Apache2.

I have the same issue with openHAB 2.4.0 on Raspbian and an iOS device: As soon as I go a level deeper in the app (i.e., entering a group defined in the sitemap) or leave the level again, in the logfile two new lines appear:
   [io.openhabcloud.internal.CloudClient] - Jetty request xxxxxx failed: null
   [io.openhabcloud.internal.CloudClient] - Response Failure: null
This is independent from whether I am using the local or the remote connection.

What seems to be worse:
Every now an then I get a bunch of exceptions. This seems to be related to me leaving the local area (Wifi) and switching to remote:
exceptions.txt (13.8 KB)

Being quite a novice to the openHAB world, I have no clue what to do next. But being a developer I really don’t like warnings and exceptions in log files. :wink:

It’s probably one of the memory leaks that was fixed in openHAB 2.4.0. You might also want to check if your openHAB is not continuously trying to install some non-existing addon which causes a lot of unnecessary load. See also After upgrade to 2.4 stable I'm flooded with java.lang.IllegalStateException.