- Platform information:
- Hardware: Linux 64 /16gb ram /100 gb storage not full
- OS: Debian 10
- Java Runtime Environment: openjdk 11
- openHAB version: 3.1.0
Hello everyone,
I see in my /var/log/syslog (and only in syslog, nothing in openhab.log) regular OutOfMemoryError :
Exception in thread “OH-items-40” java.lang.OutOfMemoryError: Java heap space
Always from an OH-items-* thread (but not the same number)
Sometimes with regularity (every 30 seconds, or with one minute between), and sometimes not (2 ou 3 secondes in between, or nothing during several minutes)
The strange part is that the application is working fine. Perfectly responsive. No glitch, no complain at all, everything working as expected.
I have 16g of RAM. Java, by default, allocate approximately 25% of this, so I see 4g allocated with the top command. I have plenty of free ram (I can see it with the command “free” ).
I tried setting the EXTRA_JAVA_OPTS to “-Xmx1g” in the the /etc/default/openhab file. The top command shows that everything is allocated correctly. The application is still working flawlessly.
I made a heapdump with jmap. The heap dump size is only 230 mb
I opened the heap dump file with Eclipse Memory Analyzer and saw absolutely nothing. I have a little warning about a PyDictionary (the biggest object type in memory) which take a staggering size of … 16mb.
How could I have OutOfMemoryError with so little memory effectively used ?? A supposition : one piece of code try to allocate a gigantic object, and the JVM tells it to go away, shut the thread, and throw a OutOfMemoryError in the logs, but the rest of the application is still fine with plenty of free memory ? What do you think ?
I have no error in the openhab log (just one during the hue emulation service initialization, about some cxf interceptor) :
Interceptor for {http://192.168.0.1:80/description.xml}WebClient has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
(I think it’s a false flag)
I tried disabling some bindings of my system, but to no avail. Before spending plenty of time on it,and risking the peace of my system, I wanted to check if someone maybe has an idea ?