B4J Question java.exe memory growing dramatically when using Sqlite

kostefar

Active Member
Licensed User
Longtime User
Dear All,

I´m having a db with 417 rows and 19 columns, where 300 websocket inputs a sec (approx.) are being used to update the db + some processing is taking place, see code. I noticed that the size of java.exe is growing and growing, which I´m pretty sure is because of the SQLite db. The db is running in the memory (which is way more smooth), but when I tried using a file instead, it´s only taking up 50 kb of space, so it´s not the db table itself that causes this.

My idea is that so much is going on in SQLite that it cannot maintain the cache properly or something like that.

It sits for about ½ an hour at around 1 GB, then jumps to 2 GB and suddenly to 4 GB. I have seen it reaching 8 GB after 3 hours.

I could make a workaround, where the db gets cleared every hour or so, which would not be a big issue for the functionality, but I would rather that this memory problem gets fixed.
Any ideas?

The map that´s sent to insert_livedata contains parsed data from the websocket message.

B4X:
Sub Insert_livedata (m As Map)
    Dim pair As String = m.Get("pair")
    Dim rs As ResultSet
    Dim diff As Double
    Dim rowid As Int

    sql3.ExecNonQuery2("UPDATE table2 Set p1a = ?, p1b = ?, p1av = ?, p1bv = ? WHERE p1 = ?", Array As Object(m.Get ("a"), m.Get("b"), m.Get ("av"),m.Get("bv"),p))
    sql3.ExecNonQuery2("UPDATE table2 Set p2a = ?, p2b = ?, p2av = ?, p2bv = ? WHERE p2 = ?", Array As Object(m.Get ("a"), m.Get("b"), m.Get ("av"),m.Get("bv"),p))
    sql3.ExecNonQuery2("UPDATE table2 Set p3a = ?, p3b = ?, p3av = ?, p3bv = ? WHERE p3 = ?", Array As Object(m.Get ("a"), m.Get("b"), m.Get ("av"),m.Get("bv"),p))
    rs = sql3.ExecQuery2("SELECT rowid FROM table2 WHERE (p1 = ?) OR (p2 = ?) OR (p3 = ?)", Array As String(p, p, p))
    Do While rs.NextRow
        rowid = (rs.GetInt ("rowid"))
        Dim diffmap As Map = Find_difference (rowid)
        Update_diff (diffmap,rowid)
        Loop
    rs.Close
    End Sub


Sub Update_diff (m As Map,rowid As Int)
    Dim diff As Double = m.Get("diff")
    Dim p1 As String = m.Get("p1")
    Dim p2 As String = m.Get("p2")
    Dim p3 As String = m.Get("p3")
    Dim logic As String = sql3.ExecQuerySingleResult2 ("SELECT logic FROM table2 WHERE rowid = ?", Array As String (rowid))
        Dim c1 As String = sql3.ExecQuerySingleResult2 ("SELECT p1 FROM table2 WHERE rowid = ?", Array As String (rowid))
        Dim c2 As String = sql3.ExecQuerySingleResult2 ("SELECT p2 FROM table2 WHERE rowid = ?", Array As String (rowid))
        Dim c3 As String = sql3.ExecQuerySingleResult2 ("SELECT p3 FROM table2 WHERE rowid = ?", Array As String (rowid))
        diff = NumberFormat2(diff,1,8,8,False)
        Dim p As String = rowid & ": " &  c1 & "/" & c2 & "/" & c3
        sql3.ExecNonQuery2 ("UPDATE table2 Set difference = ? WHERE rowid = ?", Array As Object (diff, rowid))
    Dim writestring As String = (p  & " - " & " p1a: " & p1 &  " p2b: " & p2 & " p3a: " & p3   & " " & sql3.ExecQuerySingleResult ("SELECT difference FROM table2 WHERE rowid = " & (rowid)))
                tx.WriteLine (DateTime.Time(DateTime.Now) & " " &  writestring)
End Sub

Sub Find_difference (rowid As Int) As Map
    Dim diff As Double
    Dim p1 As Double
    Dim p2 As Double
    Dim p3 As Double
    Dim logic As String
    logic = sql3.ExecQuerySingleResult2 ("SELECT logic FROM table2 WHERE rowid = ?", Array As String (rowid))
    If logic.StartsWith ("da") Then
        p1 = sql3.ExecQuerySingleResult2 ("SELECT p1a FROM table2 WHERE rowid = ?", Array As String (rowid))
    Else
        p1 = sql3.ExecQuerySingleResult2 ("SELECT p1b FROM table2 WHERE rowid = ?", Array As String (rowid))
    End If
    If logic.SubString2(2,4) = "da" Then
        p2 = sql3.ExecQuerySingleResult2 ("SELECT p2a FROM table2 WHERE rowid = ?", Array As String (rowid))
    Else
        p2 = sql3.ExecQuerySingleResult2 ("SELECT p2b FROM table2 WHERE rowid = ?", Array As String (rowid))
    End If
    If logic.EndsWith ("da") Then
        p3 = sql3.ExecQuerySingleResult2 ("SELECT p3a FROM table2 WHERE rowid = ?", Array As String (rowid))
    Else
        p3 = sql3.ExecQuerySingleResult2 ("SELECT p3b FROM table2 WHERE rowid = ?", Array As String (rowid))
    End If
    diff = NumberFormat2(p1*p2*p3,1,8,8,False)
    Dim m As Map
m.Initialize
    m.Put ("diff",diff)
    m.Put ("p1", p1)
    m.Put ("p2", p2)
    m.Put ("p3", p3)
    Return m
End Sub
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
For ref: i also use SQLite inmemory DB, with constant new data inserting, no such issue. Memory usage is 160 .... 250 MB, floating.
Will inspect for longer time...
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
For ref: i also use SQLite inmemory DB, with constant new data inserting, no such issue. Memory usage is 160 .... 250 MB, floating.
Will inspect for longer time...
Thanks! Maybe it´s worth mentioning that I´m in debug mode, but I should perhaps try to see how things work out in release mode.
Are you in release mode or debug mode and what do you use for monitoring?
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
Please learn how to use parameterized queries.
Thanks, everything has now been parameterized, see updated code in the initial message. The problem is not gone though, which I also don´t think is what you were expecting.
It sat at around 1.9 GB memory consumption the first hour and then jumped up to 2.77 and now it´s above 3.
I tried running the original code for 24 hours and noticed that it does not go beyond 9 GB, which is great, but way more than I would expect.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Have you tried (in Insert_livedata) putting the values from m.get("a") etc into variables then using those in the updates (probably saves creating temp variables on each update line)

B4X:
Dim a As ?? = m.get("a")
.....
Dim bv as ?? = m.get("bv")

    sql3.ExecNonQuery2("UPDATE table2 Set p1a = ?, p1b = ?, p1av = ?, p1bv = ? WHERE p1 = ?", Array As Object(a,b,av,bv,p)
....
'*** if p1,p2,p3 are defined in the db with the same datatype 
    rs = sql3.ExecQuery2("SELECT rowid FROM table2 WHERE ? IN (p1, p2, p3)", Array As String(p))
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I tried running the original code for 24 hours and noticed that it does not go beyond 9 GB, which is great, but way more than I would expect.
If you are not in a hurry then let it run for a few days and see whether you hit an OOM error.
You can also start the JVM with a more limited heap size to make the test more rapid.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
So I thought I did that already, but had an extra look. I do not see anything left in the code, where I can do this. Am I missing something?
I feel that your code is not optimized.
Can you create a project to simulate it?
It will take time for us to create our own simulation.

My second advice is to avoid using too much ExecQuerySingleResult2 and replace them with ExecQuery2.
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
Have you tried (in Insert_livedata) putting the values from m.get("a") etc into variables then using those in the updates (probably saves creating temp variables on each update line)

B4X:
Dim a As ?? = m.get("a")
.....
Dim bv as ?? = m.get("bv")

    sql3.ExecNonQuery2("UPDATE table2 Set p1a = ?, p1b = ?, p1av = ?, p1bv = ? WHERE p1 = ?", Array As Object(a,b,av,bv,p)
....
'*** if p1,p2,p3 are defined in the db with the same datatype
    rs = sql3.ExecQuery2("SELECT rowid FROM table2 WHERE ? IN (p1, p2, p3)", Array As String(p))
Thanks, that did not change anything though but may still have made a tiny difference.
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
I feel that your code is not optimized.
Can you create a project to simulate it?
It will take time for us to create our own simulation.

My second advice is to avoid using too much ExecQuerySingleResult2 and replace them with ExecQuery2.
For creating a test project shared privately with one or more of you, that is a nice offer. But let´s first see what the error log in my next post to Erel will reveal :)
Why is it better to use ExecQuery2? This means creating a resultset that needs to be looped over, as opposed to one single query result, so is it not more efficient to keep it the way it is?
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
If you are not in a hurry then let it run for a few days and see whether you hit an OOM error.
You can also start the JVM with a more limited heap size to make the test more rapid.

Thanks! So I did this with:

B4X:
#VirtualMachineArgs: -Xms1G -Xmx1G

Which after some time gave me the following error:

B4X:
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "HttpClient@345d6ad4-scheduler-1"
java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "HttpClient@2c512326-scheduler-1"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1481886741-30"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-1"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1581150373-45"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "HttpClient@8b90472-scheduler-1"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1313558058-99"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@284076088-107"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@813118854-70"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@284076088-106"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "HttpClient@25721f1-scheduler-1"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@841457848-76"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1578375655-83"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "HttpClient@826770a-scheduler-1"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "HttpClient@f747b12-scheduler-1"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@813118854-66"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@813118854-68"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1481886741-114"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "InvokeLaterDispatcher"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1973226632-51"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "HttpClient@1b70ad0d-scheduler-1"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1578375655-87"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1973226632-112"
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@284076088-109"
java.nio.channels.ClosedChannelException
    at org.eclipse.jetty.websocket.core.internal.WebSocketSessionState.onEof(WebSocketSessionState.java:169)
    at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.onEof(WebSocketCoreSession.java:253)
    at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.onClose(WebSocketConnection.java:221)
    at org.eclipse.jetty.io.ssl.SslConnection.onClose(SslConnection.java:347)
    at org.eclipse.jetty.io.SelectorManager.connectionClosed(SelectorManager.java:329)
    at org.eclipse.jetty.io.ManagedSelector$DestroyEndPoint.run(ManagedSelector.java:1113)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.nio.channels.ClosedChannelException
    at org.eclipse.jetty.websocket.core.internal.WebSocketSessionState.onEof(WebSocketSessionState.java:169)
    at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.onEof(WebSocketCoreSession.java:253)
    at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.onClose(WebSocketConnection.java:221)
    at org.eclipse.jetty.io.ssl.SslConnection.onClose(SslConnection.java:347)
    at org.eclipse.jetty.io.SelectorManager.connectionClosed(SelectorManager.java:329)
    at org.eclipse.jetty.io.ManagedSelector$DestroyEndPoint.run(ManagedSelector.java:1113)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038)
    at java.base/java.lang.Thread.run(Thread.java:832)
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1581150373-46"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-3-thread-5"
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1313558058-97"
java.lang.OutOfMemoryError: Java heap space
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@841457848-78"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1481886741-36"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1578375655-89"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1581150373-48"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1578375655-118"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@1581150373-111"
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.OutOfMemoryError: Java heap space
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "WebSocket@284076088-128"
java.lang.OutOfMemoryError: Java heap space
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721) 
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NoClassDefFoundError: Could not initialize class java.time.LocalTime$1
    at java.base/java.time.LocalTime.get0(LocalTime.java:685)
    at java.base/java.time.LocalTime.getLong(LocalTime.java:679)
    at java.base/java.time.LocalDateTime.getLong(LocalDateTime.java:721)
    at java.base/java.time.ZonedDateTime.getLong(ZonedDateTime.java:857)
    at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
    at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2704)
    at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2343)
    at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1847)
    at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1821)
    at java.base/java.time.ZonedDateTime.format(ZonedDateTime.java:2161)
    at org.eclipse.jetty.logging.Timestamp.formatTick(Timestamp.java:108)
    at org.eclipse.jetty.logging.Timestamp.formatNow(Timestamp.java:82)
    at org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:134)
    at org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
    at org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:647)
    at org.eclipse.jetty.logging.JettyLogger.warn(JettyLogger.java:558)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1050)
    at java.base/java.lang.Thread.run(Thread.java:832)

Since there is no evidence of this having anything to do with SQL, does this mean, that my focus is wrong? You may remember that I recently posted a question about how to handle websockets that unexpectedly gets closed, where you suggested using classes rather than a simple array + a loop in the Ws_Close event going over the 8 open websockets to see which one was closed.
I have not yet implemented said functionality with the Ws_Close event nor upgraded the code to use classes for this, but since websockets are mentioned several times in the OOM error, do you think this is where the culprit is?
It also mentions httpclient, but I can tell you that I got only one httpjob open BEFORE the whole websocket circus starts, which also is released before that.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
For creating a test project shared privately with one or more of you, that is a nice offer. But let´s first see what the error log in my next post to Erel will reveal :)
Why is it better to use ExecQuery2? This means creating a resultset that needs to be looped over, as opposed to one single query result, so is it not more efficient to keep it the way it is?
Forget about the use of ExecQuery2.

I suspect it is related to the data you have in the table2.
I actually created a simple simulation with duplicate data. It is base on my assumption that the query try to update more than one row when return from Find_difference sub causing high processes. I may be wrong since your code seems uncomplete. For e.g variable pair is not used and undeclared variable p. We also don't have the actual data to test so it is hard to say.

We also not sure what is your actual B4J server code looks like for handling the web socket handler.
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
There is no doubt that there is a memory leak somewhere.

Use this tool to analyze the heap: https://visualvm.github.io/
Thanks Erel,

I have been experimenting a bit with this, but not sure what to look for. I had it running together with the b4j project until it crashed to get a heap dump on OOME. It´s telling that the crash was caused by a websocket, but if I only run the websockets part, without involving anything related to db insertion, it just goes on and on without increasing memory consumption. Unfortunately it´s too big to be attached (128 mb as rar, 192 mb as zip), but would it be useful for you to see what´s going on in the first place? Then I´ll find a place where I can make it available to you, but otherwise I need a bit of help here on what to do.
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
Forget about the use of ExecQuery2.

I suspect it is related to the data you have in the table2.
I actually created a simple simulation with duplicate data. It is base on my assumption that the query try to update more than one row when return from Find_difference sub causing high processes. I may be wrong since your code seems uncomplete. For e.g variable pair is not used and undeclared variable p. We also don't have the actual data to test so it is hard to say.

We also not sure what is your actual B4J server code looks like for handling the web socket handler.
Thanks, if I do not get this resolved through Visual VM, would you mind me sending you a copy of what I have got going on in a private message? Pair should be "p" btw., I just renamed the variables when pasting here, but forgot this one.
 
Upvote 0
Top