rhasspy as a service #86
Comments
Isn't this one of the use cases of Docker? If we add a health check to Rhasspy's Docker configuration, Docker is able to detect when Rhasspy crashes and restart it. And when you say "crashing", you mean that Rhasspy really quits? Or do you mean that you're seeing stack traces in Rhasspy's output but it keeps running? |
I'm not familiar with docker and guess a python venv is lighter/simpler ? When I say crashing, yes it quit. It comes back to prompt and I have to restart it. I may try to start it with systemd to see if it works. |
Can you open a separate issue with specific information about this? |
I'm not at home and have no access to it so I can't see what happened. |
Running Rhasspy as a systemd service should be pretty straightforward: If you manage to get a systemd service running, you can ask @synesthesiam to include it in this repo via a pull request for others to enjoy :) |
I noted that Rhasspy consume more and more memory with each request (training, transcription, parsing, etc.) and never releases it (which may be ok on Linux systems). I have a Rhasspy docker container running using almost 1GB of memory (at startup it only consumes 200M) and increasing with each training/request. Maybe there is a memory leak somewhere that make Rhasspy crash after multiple requests with the limited Rpi resources? |
I too have noticed Rhasspy seems to gradually consume all available memory - using docker on an rpi4. I can't say I've noticed a pattern as to when it occurs, but thought i'd add that it isn't a unique issue (I wondered if it was something I had done!). |
For those familiar with linux/systemd, would this work ?
then:
Then I can: Sounds right ? |
Doesn't work. Rhasspt start but decoder doesn't work:
But wakeword get detected, but no intent recognized. And on first time, without busy error lol ! |
This must be due to needing absolute paths for everything in a systemd service. Can you set a working directory somehow? |
This is really concerning. Anyone know of some good python performance tools we could use to narrow down the problem? |
I did:
|
This is a working systemd unit from my setup. Note that I have rhasspy installed in ~/apps so you will need to update the WorkingDirectory for your install.
|
Thanks @UnderpantsGnome! I've added a section to the documentation based on your answer here :) |
Actually rhasspy, as python env, is crashing a lot.
Would it be possible to set as a service, that would restart itself when it crash ? And also automatically start when rpi start ?
It would of course still talk with the console and restart when the console ask for it.
The text was updated successfully, but these errors were encountered: