[SOLVED] Problems at start

I just enabled ZRAM on my Raspberry Pi 3 Model B Plus Rev 1.3 through openhabian-config. Previously I have configured the Amanda backup, and the openHAB backup script. Just to be safe, I rebooted after the installation in this way:

[20:39:34] openhabian@openhab:~$ sudo systemctl stop openhab2
[20:40:17] openhabian@openhab:~$ sudo zram-config stop
umount: /var/log: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
Warning: Stopping rsyslog.service, but it can still be activated by:
/usr/local/bin/zram-config: line 158: echo: write error: Device or resource busy
umount: /var/lib/openhab2 (overlay1) unmounted
[20:40:56] openhabian@openhab:~$ sudo shutdown -r now

Should I be worried about /usr/local/bin/zram-config: line 158: echo: write error: Device or resource busy? Where the mentioned device is /sys/class/zram-control/hot_remove.

My Pi is up again and everything seems fine.

[20:44:13] openhabian@openhab:~$ zramctl 
/dev/zram0 lz4           600M    4K   76B    4K       4 [SWAP]
/dev/zram1 lz4           600M 25.5M  3.3M  3.9M       4 /opt/zram/zram1
/dev/zram2 lzo           500M   34M  5.5M  6.2M       4 /opt/zram/zram2

I think no, that’s probably on first unmount attempt when it cannot unmount /var/log because that’s still in use.

I just removed zram. My system wasn’t working anymore. My log is full with Out Of Memory Error : Java heap space.

I’ll have to look into it later on this week.

That’s when Java cannot allocate memory and unlikely to be ZRAM related. Check what -xmx option java is started with and eventually increase it (see /etc/default/openhab2).

I have it at openhabian’s default:

EXTRA_JAVA_OPTS="-Xms250m -Xmx350m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

I didn’t have these errors before I enabled ZRAM.

Just to be sure it’s ZRAM or not, I’ve enabled it again. Let’s see if my lights go on tomorrow morning :sweat_smile:

Everything seems to work as expected with zram enabled. Don’t know where yesterdays problems came from.