For a couple of weeks now my home assistant instance running on a raspberry pi 3 with a 256GB SD card keeps randomly restarting, some days it does some it doesn’t. I already tried checking to see if I had any automations that could cause this and I do not. This is very confusing and the logs do not seem to show anything they just saying ha was not shut down properly. I tried a different power supply and it did not change anything. The raspberry pi itself just runs a warm which is normal for the board since I got it.
It allows you to add more swap space. Don’t be confused by how it works - it is an addon, but it just starts, creates the specified extra swap file if it isn’t already there, issues the command to add it, and then ends - it does not run all the time like other addons, so don’t think it isn’t working when you see it start and stop.
Even if this solves the problem and your SD card is OK at the moment, it is pretty much guaranteed to fail later, so consider upgrading to an SSD drive.