Asyncio TimeoutError

I am using Rasa X docker-compose setup, as my deployment infrastructure. The server was created according to specification in the docs. I have an assistant, which contains a few scenarios and model is ~400MB. I constantly obtain error like this in my Rasa X logs:

rasa-x_1           | [2021-07-06 20:31:26 +0000] [21] [ERROR] Exception occurred while handling uri: 'http://rasax-allmedica.westeurope.cloudapp.azure.com/api/projects/d$
fault/models?limit=1&offset=0&tag=production'                                                                                                                             
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 216, 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 146, 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 44, 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 92, in version                                       
rasa-x_1           |     response = await session.get(                                                                                                                    
rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/aiohttp/client.py", line 504, in _request                                                             
rasa-x_1           |     await resp.start(conn)                                                                                                                           
rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_reqrep.py", line 860, in start                                                         
rasa-x_1           |     self._continue = None
rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/aiohttp/helpers.py", line 596, in __exit__
rasa-x_1           |     raise asyncio.TimeoutError from None
rasa-x_1           | asyncio.exceptions.TimeoutError
rasa-x_1           |
rasa-x_1           | [2021-07-06 20:31:26 +0000] - (sanic.access)[INFO][172.20.0.10:53974]: GET http://rasax-allmedica.westeurope.cloudapp.azure.com/api/projects/default$
models?limit=1&offset=0&tag=production  500 214

The model was manually uploaded into Rasa X (it wasn’t working via API). It sometimes works and sometimes it doesn’t. I’m using RASA X 0.41 (newest at the moment) and RASA 2.6.2.

Anyone has any idea what can cause that behaviour? It’s quite important, because it makes Rasa X completely useless in terms of production and only solution I have is getting rid of it and switch to only Rasa Open Source.

Thanks in advance!

Same problem.

@lynndisco Go for Rasa X 0.39 check the rasa compatibility matrix for this version. It will solve your. issue.

I’m experiencing the same issue with Rasa X version 0.42.5 and Rasa SDK 2.8.2

@felipemcg its server site?

It’s deployed using docker-compose on a linux machine

@felipemcg can you share docker ps with us?

@felipemcg confirm me at the time you installed rasa x 0.42.5 using docker it install Rasa SDK 2.8.2 only of you updated?

Here it is

@felipemcg alright means rasa-sdk is 2.8.2 default. Can you please also share the error screenshot which you are getting while running docker-compose up Thanks.

This is the log from the rasa-production container. This error happens when it tries to validate the first slot of a form. After this error, the custom action server doesn’t respond to any request (For example, if I try to start again the form from another conversation, it doesn’t reply)

@felipemcg are you calling an API in code?

Yes we are doing GET requests and then doing fuzzy string matching (using the fuzzywuzzy library)

@felipemcg is requirement is met for fuzzywuzzy? and API call as this issue come only when Timeout for request.

Yes, this is how are requirements file looks like for our action server. Is there a way to increase timeout for API calls? to test a higher value and check if that’s the problem

requests==2.25.1
langdetect==1.0.9
python-dotenv==0.19.2
rasa_sdk==2.8.2
fuzzywuzzy==0.18.0

@felipemcg can please just mention without version in requirements.txt?

@felipemcg can you share the snippet code for API call? Can I ask which API you are using?

@felipemcg you trained the model one Rasa X and Active?

Tried it without the version (leaving only the version fixed for rasa SDK) and still same results. The model has been trained directly on Rasa X and it’s active.

@felipemcg very strange :frowning: can I see online if you like?