OpenHAB 3.1 / Needs restart every 72 hours to work again

See here as this may help you monitor the heap size that openhab uses.

OH3.1 out of memory error - Setup, Configuration and Use / Runtime - openHAB Community