My OSMC on my Raspberry Pi 3 crashes constantly and I have a standard system load of 3-8 (0-1 is normal).
The power supply I’m using has 3A so, this should be fine.
I think it started with one of the last updates.
My memory is always full and I have to use a 2GB swapfile which is also almost full…
Besides Kodi, I’m running TVHeadend and OSCAM.
Kodi uses 60% of the memory, TVHeadend and OSCAM together only use 10%.
I also tried run Kodi alone and stopped TVHeadend and OSCAM. But that did not solve the problem in any way.
any idea what to do?
Sorry to hear you are having issues, but we need logs; so we can investigate this further.
Ok, I’ll do my best.
for the beginning: this is a recent screenshot of htop.
Jun 02 19:26:29 osmc sshd: Failed password for root from 220.127.116.11 port 46396 ssh2
Jun 02 19:26:31 osmc sshd: Failed password for root from 18.104.22.168 port 46396 ssh2
Jun 02 19:26:35 osmc sshd: Failed password for root from 22.214.171.124 port 46396 ssh2
Jun 02 19:26:37 osmc sshd: Failed password for root from 126.96.36.199 port 46396 ssh2
Jun 02 19:26:40 osmc sshd: Failed password for root from 188.8.131.52 port 46396 ssh2
Jun 02 19:26:43 osmc sshd: Failed password for root from 184.108.40.206 port 46396 ssh2
Are port forwarding on your router for ssh using port 22, have you changed the default osmc password?
Yes, I’m forwarding. Just changed to a different port, other than default.
And yes I’ve changed the default password right after I initially installed OSMC.
I also experimented with fail2ban, but that used a lot of resources… so I stopped that.
Kodi.bin high resource use-age, is potentially a sign that the pi may have been compromised; also coupled with the fact that you were port forwarding using the default. I would back up your settings and reinstall and see if the issue persists.
I found the issue!!!
You said I should backup my stuff and reinstall OSMC…
Well while zipping the userdata folder, I saw that the zipping process struggled with a file called Epg11.db.
That file is used by Kodi to store the EPG of TVHeadend. But as I found out, that file does not just contain the EPG for the upcomming and present day, but also ALL EPG data from the past. So it grew over the past to over 1GB of size. But that is not even the worst: Kodi would load that file completely into the memory on every start. At a certain point, the hardware memory of the RasPi is full and the swap file is, of course not fast enough causing Kodi to exit with a “sad emoji” screen.
I have now deleted that file (Kodi sets up a new and empy one if the file is missing) and did a reboot.
The result: Kodi is now as fast as it was on its first ever run.
I’ll gonna write a script now, which will delete that file from time to time.