rasa: Multiple sequential actions cause asyncio TimeoutError
Rasa version: 1.2.4 Rasa SDK version: 1.2.0 Python version: Python 3.6.9 (Anaconda 4.5.13) Operating system : Win10, 64bit
Issue:
Multiple sequential actions (I would say 4 and more) in row in one story lead to Task exception was never retrieved error (see traceback).
Story:
## FULL 1b
* want_search
- action_search_start_print_utter
- action_search_start_print_utter
- action_search_start_print_utter
- action_search_start_print_utter
- action_search_start_print_utter
Action:
class ActionSearchStartPrintUtter(Action):
def name(self):
return "action_search_start_print_utter"
def run(self, dispatcher, tracker, domain):
dispatcher.utter_template("utter_lets_do_it", tracker)
return []
Command or request that led to error:
[Rasa]
rasa shell --credentials credentials.yml --endpoints endpoints.yml --port 4444 --log-file logs/out.log --debug --verbose
[SDK]
python -m rasa_sdk --actions action_sdk.actions --verbose --debug
Error (including full traceback):
2019-09-03 21:17:53 INFO root - Connecting to channel 'cmdline' which was specified by the '--connector' argument. Any other channels will be ignored. To connect to all given channels, omit the '--connector' argument.
2019-09-03 21:17:53 INFO root - Starting Rasa server on http://localhost:4444
Bot loaded. Type a message and press enter (use '/stop' to exit):
Your input -> neco hledam
2019-09-03 21:18:14 WARNING root - Could not parse timestamp c1f48ac98a26479687b85d9aa9e1c2ec. Instead current UTC time will be passed to duckling. Error: invalid literal for int() with base 10: 'c1f48ac98a26479687b85d9aa9e1c2ec'
Lets do this
Lets do this
Lets do this
2019-09-03 21:18:22 ERROR asyncio - Task exception was never retrieved
future: <Task finished coro=<configure_app.<locals>.run_cmdline_io() done, defined at c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\rasa\core\run.py:122> exception=TimeoutError()>
Traceback (most recent call last):
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\rasa\core\run.py", line 126, in run_cmdline_io
server_url=constants.DEFAULT_SERVER_FORMAT.format(port)
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\rasa\core\channels\console.py", line 138, in record_messages
async for response in bot_responses:
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\async_generator\_impl.py", line 366, in step
return await ANextIter(self._it, start_fn, *args)
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\async_generator\_impl.py", line 205, in throw
return self._invoke(self._it.throw, type, value, traceback)
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\async_generator\_impl.py", line 209, in _invoke
result = fn(*args)
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\rasa\core\channels\console.py", line 103, in send_message_receive_stream
async for line in resp.content:
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\aiohttp\streams.py", line 40, in __anext__
rv = await self.read_func()
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\aiohttp\streams.py", line 329, in readline
await self._wait('readline')
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\aiohttp\streams.py", line 297, in _wait
await waiter
File "c:\users\tomas\anaconda3\envs\eqs_chatbot\lib\site-packages\aiohttp\helpers.py", line 585, in __exit__
raise asyncio.TimeoutError from None
concurrent.futures._base.TimeoutError
Rasa SDK output (if needed):
2019-09-03 21:16:20 INFO rasa_sdk.endpoint - Action endpoint is up and running. on ('0.0.0.0', 5055)
2019-09-03 21:18:16 DEBUG rasa_sdk.executor - Received request to run
2019-09-03 21:18:16 DEBUG rasa_sdk.executor - Finished running 'action_search_start_print_utter'
127.0.0.1 - - [2019-09-03 21:18:16] "POST /webhook HTTP/1.1" 200 200 0.032939
2019-09-03 21:18:18 DEBUG rasa_sdk.executor - Received request to run
2019-09-03 21:18:18 DEBUG rasa_sdk.executor - Finished running 'action_search_start_print_utter'
127.0.0.1 - - [2019-09-03 21:18:18] "POST /webhook HTTP/1.1" 200 200 0.019048
2019-09-03 21:18:20 DEBUG rasa_sdk.executor - Received request to run
2019-09-03 21:18:20 DEBUG rasa_sdk.executor - Finished running 'action_search_start_print_utter'
127.0.0.1 - - [2019-09-03 21:18:20] "POST /webhook HTTP/1.1" 200 200 0.018976
2019-09-03 21:18:22 DEBUG rasa_sdk.executor - Received request to run
2019-09-03 21:18:22 DEBUG rasa_sdk.executor - Finished running 'action_search_start_print_utter'
127.0.0.1 - - [2019-09-03 21:18:22] "POST /webhook HTTP/1.1" 200 200 0.014997
2019-09-03 21:18:24 DEBUG rasa_sdk.executor - Received request to run
2019-09-03 21:18:24 DEBUG rasa_sdk.executor - Finished running 'action_search_start_print_utter'
127.0.0.1 - - [2019-09-03 21:18:24] "POST /webhook HTTP/1.1" 200 200 0.008981
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (9 by maintainers)
Thank you. I am enjoying Rasa. A wonderful learning experience.
Get Outlook for Android
On Mon, Apr 27, 2020 at 2:52 AM -0400, “Tobias Wochinger” notifications@github.com wrote:
@ShaunHolt This is related to #4606 . There will be fix in the next release #5686
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
I would say that generally
runmode takes the same action less time than inshellmode in my environment. So users of other channels are not very affected.Returning to the beginning of the issue, the action was as simple as it could have been - it utters one text-only template:
Story was also very simple:
And it hit the timeout limit in
shellmode. Inrunmode it is done in 1 second. I thought it was a bug, but it would be a problem on my side. I think we can close this.Original story and using
runcommand (which starts socket channel):it also works properly.
There is probably problem between rasa sdk and shell.
When I change story to:
and don’t use custom actions, it works properly: