RPi3B+ - cron scheduled restart - daily?

Rhasspy 2.4.15 on Raspberry Pi 3B+ with Jabra 410 USB Speaker/microphone

As the current version occasionally gets stale/numb/hung, I’m scheduling a daily reboot of the Pi. Does anyone here think that it might be useful to schedule these reboots more frequently?

1 Like

how much memory does Rhasspy use when it become unresponsive?

I suspect this may be due to memory leaks.

Not entirely certain. I usually just login via PuTTY and reboot whenever it occurs. I understand it’s the nature of the beast, and daily SHOULD be more frequently than enough. Just wondering if anyone else (and I’ve seen at least one) are forced to reboot often?

I am not very productive (still in setup) with voice control right now, but after 5-10 trainings or a lot other setups I need to hardreset the Pi3B+, too.

I suspect there’s a memory leak in the threading/actor system. I haven’t focused on a fix, since the plan is to move Rhasspy to independent services anyways.

That said, I reboot all of my Pi’s every night. Regardless of what I’m running, they end up freezing on me if I let them run for days straight.

1 Like

I just started with a fresh installation of rasbian buster on a RPi 3B+, installed docker and rhasspy server according to the docs. I set up rhasspy with a Matrix Creator as mics etc. MQTT an direct intent handling is disabled, my wakeword engine is porcupine, my microphone is using arecord. Everything else is not changed. I’m using the ‘de’ profile.
Lately I have to hard reset my Pi every couple minutes because it freezes totally. I managed to track it down to rhasspys RAM usage.
Is there anything I can do?

A workaround is to add the -m 512m option to the Docker command to cap the container’s available memory to 512 megabytes. That’s just an arbitrary number of course. You should take a look at the output of docker stats and see how much RAM your container is normally using. After your container reaches its memory limit, it will be killed, and restarted if you added the --restart unless-stopped option like in Rhasspy’s docs.

Of course the fundamental problem is that there’s a memory leak, but until that is found, you should be able to manage with this workaround without freezing your Raspberry Pi. Unless it’s really every couple minutes, because that’s quite unusable…

1 Like

Thanks for the quick response!
I reinstalled docker and rhasspy, reset my profiles directory and removed node-red. Hereby I managed to avoid minutely freezes. It seems to be stable now.
Still thanks for the docker option, I will definitely consider that if it gets worse again.

Crap, I thought I’d fixed that memory leak :frowning:

I noticed if in --profile
“arecord”: {
“device”: “null”
I have a memory overflow and crash!
I also restart cron every night:
0 2 * * * / sbin / shutdown -r 3 #reboot night