/api/text-to-intent => can't start new thread


I’ve wrote a batch tester to fine tunes my slots/intents.
It works really nice and is a good help, but after some time, I got this:

[INFO:5048519] quart.serving: POST /api/text-to-intent 1.1 500 22 9514
[ERROR:5048512] main: can’t start new thread
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/quart/app.py”, line 1471, in full_dispatch_request
result = await self.dispatch_request(request_context)
File “/usr/local/lib/python3.6/dist-packages/quart/app.py”, line 1519, in dispatch_request
return await handler(**request_.view_args)
File “app.py”, line 661, in api_text_to_intent
intent = (await core.recognize_intent(text)).intent
File “/usr/share/rhasspy/rhasspy/core.py”, line 215, in recognize_intent
with self.actor_system.private() as sys:
File “/usr/share/rhasspy/rhasspy/actor.py”, line 295, in enter
File “/usr/share/rhasspy/rhasspy/actor.py”, line 114, in start
File “/usr/lib/python3.6/threading.py”, line 846, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can’t start new thread
[INFO:5048501] quart.serving: GET /api/version 1.1 200 6 9398

The only thing to do is tostop/start docker container (or reboot the pi).

1 Like

This hit me this evening. Had restarted from within Rhasspy many, many times, then strange things similar to yours began occurring. Shutdown and rebooted the Pi and all is good again. Many thanks!! :slight_smile:

I also keep running into this problem.

The only solution so far seems to be to restart the Docker image.

I created a cron job on my Pi to reboot the system every evening.

Not something we should have to do …

No, but for now, it’s quite an easy fix.

I’ve pushed a (possible) fix for this. Please let me know if you see the same problem.

It seems some short-lived actors’ threads were not exiting, so this would probably build up until some maximum number of threads was reached.