LGWebOS Binding - Text message size still exceeds maximum size

Hello all

Release = Debian GNU/Linux 11 (bullseye)

Kernel = Linux 6.1.21-v8+

Platform = Raspberry Pi 4 Model B Rev 1.5

Uptime = 1 day(s). 3:28:46

CPU Usage = 3.02% avg over 4 cpu(s) (4 core(s) x 1 socket(s))

CPU Load = 1m: 0.37, 5m: 0.20, 15m: 0.18

Memory = Free: 1.68GB (45%), Used: 2.07GB (55%), Total: 3.75GB

Swap = Free: 2.99GB (100%), Used: 0.00GB (0%), Total: 2.99GB

Root = Free: 22.08GB (79%), Used: 5.68GB (21%), Total: 28.98GB

Updates = 0 apt updates available.

Sessions = 1 session(s)

openHAB 4.1.1 - Release Build

WebOS: 8.3.0-15

LG WebOS Binding. Connection failed. Debug shows, that message size exceeded.

2024-02-01 15:06:35.994 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘LG39_Power’ changed from OFF to ON

2024-02-01 15:06:36.994 [DEBUG] [ebos.internal.handler.LGWebOSHandler] - Connection failed - error: Text message size [4316809] exceeds maximum size [4194304]

2024-02-01 15:06:36.995 [DEBUG] [bos.internal.handler.LGWebOSTVSocket] - WebSocket Closed - Code: 1009, Reason: Text message size [4316809] exceeds maximum size [4194304]

2024-02-01 15:06:36.995 [DEBUG] [bos.internal.handler.LGWebOSTVSocket] - setState new DISCONNECTED - current REGISTERED

I found this thread, which state the same issue, which has been fixed in increasing buffer size.

Removing not used apps and services from tv does not reduce the message size. It seems, that the tv announces all services.

Is there a workaround to increase the message size on OH or any other suggestions to resolve this issue?
Thanks in advance!

Regards Daniel

The previous change from 3 MB to 4 MB is this one:

We can try to increase it again, for example to 5 MB.


OK, that would be great, thanks!
Does it make sense to limit the message size? Later on, 5MB will exceed again, I guess.

Regards Daniel

I guess the web socket API has a max size by default and we need to adjust it

Here is Jetty documentation:

This is a memory conservation option, memory over this limit will not be allocated by Jetty for handling text messages.

Fix proposed:

Great, thanks!

Fix is now merged and so included in receipt 4.2 snapshots.