Write-error on swap-device

  • Platform information:
    • Hardware: Compulab IoT hw with RPi3B Compute module
    • OS: debian 10.11
    • Java Runtime Environment: OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
    • openHAB version:3.2.0
  • Issue of the topic:
    The installation works fine, but the error shown in dmesg repeated several times per 100 ms is worrying, see below.:
  • Please post configurations (if applicable):
    • Some 10 items are read and stored in InfluxDB every minute
  • If logs where generated please post these here using code fences:
output from dmesg:

[533351.302744] Write-error on swap-device (254:0:886112)
[533351.308261] Write-error on swap-device (254:0:985960)
[533351.313796] Write-error on swap-device (254:0:637328)

output from df:

[22:24:10] openhabian@<myIP>:~$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root       14657232 6575580   7444460  47% /
devtmpfs          464772       0    464772   0% /dev
tmpfs             498052       0    498052   0% /dev/shm
tmpfs             498052    1460    496592   1% /run
tmpfs               5120       0      5120   0% /run/lock
tmpfs             498052       0    498052   0% /sys/fs/cgroup
/dev/mmcblk0p1    258095   49305    208791  20% /boot
/dev/zram1        588352     924    544420   1% /opt/zram/zram1
overlay1          588352     924    544420   1% /var/lib/openhab/persistence
/dev/zram2        689128  173812    465140  28% /opt/zram/zram2
overlay2          689128  173812    465140  28% /var/log
tmpfs              99608       0     99608   0% /run/user/1000

and from free -ht:

[22:25:15] openhabian@<myIP>:~$ free -ht
              total        used        free      shared  buff/cache   available
Mem:          972Mi       769Mi        31Mi       0.0Ki       170Mi       192Mi
Swap:         2.6Gi       1.9Gi       656Mi
Total:        3.5Gi       2.7Gi       688Mi
[

Did you ever find a solution for this? I am running into the same issue.

Additionally, my raapbian crashes periodically, and i am trying to rule out this issue as the root cause.

thanks

Hi, sorry late response. No I have not yet found any solution, but try to remove logs periodically. I still need to reboot as the problem continue to occur.

Running InfluxDB instead of using the default database is rarely needed, but on a 1GB Raspi this ain’t a good idea for sure, even more so if using zram as you do.
Move back to rrd4j or to some machine with more RAM.

Thanks, I have moved the database to a server, and only keep a text log file locally