RasaHQ / rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
18.37k stars 4.57k forks source link

Rasa X with docker: Prevent Timout Errors with SANIC_REQUEST_TIMEOUT #10010

Closed jsalbr closed 1 year ago

jsalbr commented 2 years ago

What problem are you trying to solve?

I was trying to get Rasa X with docker running on a virtual machine. But when working on slower systems you frequently get sanic timeout errors, because the default is 10 seconds. This has been reported for example in this thread: https://forum.rasa.com/t/asyncio-timeouterror/45459

What's your suggested solution?

The solution is very easy: Just add another environment variable in docker-compose.yml und rasa-x:

SANIC_REQUEST_TIMEOUT: "10" # increase value if you get timeout errors

See https://sanicframework.org/en/guide/deployment/configuration.html#environment-variables

Examples (if relevant)

Here an example:

rasa-x_1 | [2021-10-28 17:07:36 +0000] [21] [ERROR] Exception occurred while handling uri: 'http://xxx/api/projects/default/models?limit=1&offset=0' rasa-x_1 | Traceback (most recent call last): rasa-x_1 | File "/usr/local/lib/python3.8/dist-packages/sanic/app.py", line 973, in handle_request rasa-x_1 | response = await response rasa-x_1 | File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/decorators.py", line 217, in decorated_function rasa-x_1 | return await await_and_return_response(args, kwargs, request) rasa-x_1 | File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/decorators.py", line 147, in await_and_return_response rasa-x_1 | response = await response rasa-x_1 | File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py", line 45, in get_models rasa-x_1 | models, total_models = await _model_service(request).get_models( rasa-x_1 | File "/usr/local/lib/python3.8/dist-packages/rasax/community/services/model_service.py", line 747, in get_models rasa-x_1 | minimum_compatible_version = await self.minimum_compatible_version() rasa-x_1 | File "/usr/local/lib/python3.8/dist-packages/rasax/community/services/model_service.py", line 160, in minimum_compatible_version rasa-x_1 | info = await stack_service.version() rasa-x_1 | File "/usr/local/lib/python3.8/dist-packages/rasax/community/services/stack_service.py", line 112, in version rasa-x_1 | response = await session.get( rasa-x_1 | File "/usr/local/lib/python3.8/dist-packages/aiohttp/client.py", line 619, in _request rasa-x_1 | break rasa-x_1 | File "/usr/local/lib/python3.8/dist-packages/aiohttp/helpers.py", line 656, in exit rasa-x_1 | raise asyncio.TimeoutError from None rasa-x_1 | asyncio.exceptions.TimeoutError

Is anything blocking this from being implemented? (if relevant)

No response

Definition of Done

Environment variable added to docker-compose

sara-tagger commented 2 years ago

Exalate commented:

sara-tagger commented:

Thanks for submitting this feature request

🚀 @rctatman will get back to you about it soon!
sync-by-unito[bot] commented 1 year ago

➤ Maxime Verger commented:

:bulb: Heads up! We're moving issues to Jira: https://rasa-open-source.atlassian.net/browse/OSS.

From now on, this Jira board is the place where you can browse (without an account) and create issues (you'll need a free Jira account for that). This GitHub issue has already been migrated to Jira and will be closed on January 9th, 2023. Do not forget to subscribe to the corresponding Jira issue!

:arrow_right: More information in the forum: https://forum.rasa.com/t/migration-of-rasa-oss-issues-to-jira/56569.