i am getting error when the action is taking some API calls are it is taking more than 8-10 minutes to process this API call.

error message

  - Encountered an exception while running action 'action_get_wait'.Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
Traceback (most recent call last):
  File "D:\DSUsers\uie83944\Anaconda\envs\rasa_2\lib\site-packages\rasa\core\processor.py", line 772, in _run_action
    events = await action.run(
  File "D:\DSUsers\uie83944\Anaconda\envs\rasa_2\lib\site-packages\rasa\core\actions\action.py", line 685, in run
    response = await self.action_endpoint.request(
  File "D:\DSUsers\uie83944\Anaconda\envs\rasa_2\lib\site-packages\rasa\utils\endpoints.py", line 163, in request
    async with session.request(
  File "D:\DSUsers\uie83944\Anaconda\envs\rasa_2\lib\site-packages\aiohttp\client.py", line 1117, in __aenter__
    self._resp = await self._coro
  File "D:\DSUsers\uie83944\Anaconda\envs\rasa_2\lib\site-packages\aiohttp\client.py", line 544, in _request
    await resp.start(conn)
  File "D:\DSUsers\uie83944\Anaconda\envs\rasa_2\lib\site-packages\aiohttp\client_reqrep.py", line 905, in start
    self._continue = None
  File "D:\DSUsers\uie83944\Anaconda\envs\rasa_2\lib\site-packages\aiohttp\helpers.py", line 656, in __exit__
    raise asyncio.TimeoutError from None

What errors do you see in your actions terminal (where you ran rasa run actions)?

Furthermore, if the API call is taking that long, it’s the API’s fault, not Rasa’s.


Check this out → rasa/constants.py at 8a18d62f433f399443ebb62030cea3b64a58881c · RasaHQ/rasa · GitHub and rasa/action.py at 8a18d62f433f399443ebb62030cea3b64a58881c · RasaHQ/rasa · GitHub

Maybe if there is a way to change the default response time (which is 5 minutes) you should be good to go.

Hello @naveenjr

Well, you need to read the documentation of the API (which you are using) how much request and in what period of time he can fetch. Secondly, to be honest if your API taking so much time to fetch the information then that is not the idle use-case, as bot should reply instantly witth all the processing, increasing time will not solve your issue. I hope this will help you. Good Luck!!

1 Like

@nik202 API call is triggering RPA platforms. There jobs/process is relatively slow .

For me, this is not an idle use case scenario, to be honest.

1 Like

@naveenjr if you are expecting a response from these RPA platforms that is to be sent back to the user, then you can maybe try to do this asynchronously using a message queue. Something like a event broker that rasa x uses to communicate with rasa open source. You can configure this in endpoints.yml.

thanks @lis

can you share some more lights on the implementation side ?

@naveenjr, sure. how are you getting inputs from the user? What kind of channels are you using?

I am collecting inputs from user chat and send these input directly to RPA platform through API calls and giving user “wait” and “mail” option for getting output.

@naveenjr, hmm, not entirely sure if I got your point right. But check if this helps - Can we handle messages in an async manner in Rasa Enterprise? - #2 by ricwo.

In your case, from what I understand you could either send the results back to the user if the user opts for a “wait” option or send out a mail (which will be done asynchronously I believe?) if the user opts for “mail” option. I’m asking you to make the wait option to go asynchronously as well.

1 Like