question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timeout error on rasa shell

See original GitHub issue

Rasa version: 1.3.9

Python version: 3.6

Issue: https://forum.rasa.com/t/timeout-error-on-rasa-shell/19638

Error can be reproduced on examples/restaurantbot. Add a time.sleep(15) to any action and run the bot.

Error (including full traceback):

2019-10-14 10:18:37 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<configure_app.<locals>.run_cmdline_io() done, defined at /Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/rasa/core/run.py:123> exception=TimeoutError()>
Traceback (most recent call last):
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/rasa/core/run.py", line 127, in run_cmdline_io
    server_url=constants.DEFAULT_SERVER_FORMAT.format("http", port)
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/rasa/core/channels/console.py", line 138, in record_messages
    async for response in bot_responses:
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/async_generator/_impl.py", line 366, in step
    return await ANextIter(self._it, start_fn, *args)
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/async_generator/_impl.py", line 205, in throw
    return self._invoke(self._it.throw, type, value, traceback)
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/async_generator/_impl.py", line 209, in _invoke
    result = fn(*args)
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/rasa/core/channels/console.py", line 103, in send_message_receive_stream
    async for line in resp.content:
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/aiohttp/streams.py", line 40, in __anext__
    rv = await self.read_func()
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/aiohttp/streams.py", line 329, in readline
    await self._wait('readline')
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/aiohttp/streams.py", line 297, in _wait
    await waiter
  File "/Users/tabergma/.virtualenv/rasa/lib/python3.6/site-packages/aiohttp/helpers.py", line 585, in __exit__
    raise asyncio.TimeoutError from None
concurrent.futures._base.TimeoutError

Command or request that led to error:

rasa shell

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:25 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
rbasto1commented, Feb 27, 2020

I’m having the same issue. We use rasa shell in development in order to have a lighter environment (just two containers needed, rasa-worker and the actions app). When we load a new model the API call to PUT /model takes more than 10 seconds, and the console crashes. Can you please add a config variable that overrides DEFAULT_STREAM_READING_TIMEOUT_IN_SECONDS? Thanks!

1reaction
IgNoRaNt23commented, Apr 15, 2020

Got a similar problem when I start a bot in rest-mode with rasa==1.9.5

Traceback (most recent call last):
  File "<local>/lib/python3.6/site-packages/rasa/core/processor.py", line 617, in _run_action
    events = await action.run(output_channel, nlg, tracker, self.domain)
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw
    return self.gen.throw(type, value, traceback)
  File "<local>/lib/python3.6/site-packages/rasa/core/actions/action.py", line 549, in run
    json=json_body, method="post", timeout=DEFAULT_REQUEST_TIMEOUT
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw
    return self.gen.throw(type, value, traceback)
  File "<local>/lib/python3.6/site-packages/rasa/utils/endpoints.py", line 146, in request
    **kwargs,
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw
    return self.gen.throw(type, value, traceback)
  File "<local>/lib/python3.6/site-packages/aiohttp/client.py", line 1012, in __aenter__
    self._resp = await self._coro
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw
    return self.gen.throw(type, value, traceback)
  File "<local>/lib/python3.6/site-packages/aiohttp/client.py", line 504, in _request
    await resp.start(conn)
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw
    return self.gen.throw(type, value, traceback)
  File "<local>/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 847, in start
    message, payload = await self._protocol.read()  # type: ignore  # noqa
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw
    return self.gen.throw(type, value, traceback)
  File "<local>/lib/python3.6/site-packages/aiohttp/streams.py", line 591, in read
    await self._waiter
concurrent.futures._base.CancelledError

My action calls another REST-service and does several retries when it fails. This may take some. I could of course change this, but it would be way more convenient to have a configurable timeout. And also a possibility to inform the user somehow, see https://github.com/RasaHQ/rasa/issues/5588

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rasa Timeout Issue - Stack Overflow
I was fetching data from an API wherein I was getting a Timeout error because it was not able to fetch the data...
Read more >
[ERROR] custom action TimeoutError - Rasa Open Source
HI, I have a long running task(selenium login to website and collect data) which takes more than 10 sec. The rasa shell raises...
Read more >
报Timeouterror 实际是系统环境超时时间设定问题与rasa无关 ...
找到timeouterror的报错信息其中有一个console.py路径进到文件中之后找到第一个数字的地方(没设置过的应该是10)改为20,还报错就改成30亲测有效.
Read more >
Web process failed to bind to $PORT within 60 seconds of ...
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch: Rasa chatbot Heroku.
Read more >
RasaHQ/rasa | Coveralls - Test Coverage History & Statistics
... fix-timeout-error · filter-grads · erohmensing-patch-2 · 1.9.x-merge · change_defaults · dependabot/pip/tensorflow-hub-0.8.0 · prepare-release-1.10.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found