voila timeout on long computations

Created on 5 Jul 2019  路  6Comments  路  Source: voila-dashboards/voila

Hi,

I am trying to convert a notebook with voila with some calculations in it that take a few minutes. I am getting this error:

[Voila] ERROR | Timeout waiting for execute reply (30s).

For nbconvert you can change the timeout with --ExecutePreprocessor.timeout=180 (or another time) at the command line. Is there a similar option in voila?

Thanks,
John

Most helpful comment

This is solved in #240, pass --ExecutePreprocessor.timeout=180, if it does not solve your problem, feel free to reopen.

All 6 comments

This looks like it is identical to #125 so I am assuming it is still an issue?

I am also running into this issue. Pretty much any cell which runs for longer than a few seconds seems to crash the whole render process. This leaves Voil谩 unusable for me.

Below is the stack trace.

[Voila] ERROR | Timeout waiting for execute reply (30s).
Exception in thread Thread-4:
Traceback (most recent call last):
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\voila\threading.py", line 25, in run
return ioloop_in_thread.run_until_complete(self._run())
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\asyncio\base_events.py", line 579, in run_until_complete
return future.result()
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\voila\threading.py", line 28, in _run
async for item in self.fn(self.args, *self.kwargs):
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\async_generator_impl.py", line 366, in step
return await ANextIter(self._it, start_fn, args)
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\async_generator_impl.py", line 197, in __next__
return self._invoke(first_fn, *first_args)
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\async_generator_impl.py", line 209, in _invoke
result = fn(
args)
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\voila\exporter.py", line 119, in async_jinja_generator
for output in self.template.generate(nb=nb_copy, resources=resources, **extra_context):
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\jinja2\environment.py", line 1045, in generate
yield self.environment.handle_exception(exc_info, True)
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\jinja2\environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\jinja2_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "c:\users\daan\appdata\local\programs\python\python37-32\share\jupyter\voila\templates\defaultnbconvert_templates\voila.tpl", line 2, in top-level template code
{% import "spinner.tpl" as spinner %}
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\jinja2\environment.py", line 1039, in generate
for event in self.root_render_func(self.new_context(vars)):
File "c:\users\daan\appdata\local\programs\python\python37-32\share\jupyter\voila\templates\defaultnbconvert_templates\voila.tpl", line 17, in root
{% endif %}
File "c:\users\daan\appdata\local\programs\python\python37-32\share\jupyter\voila\templates\defaultnbconvert_templates\base.tpl", line 14, in root
{%- block html_head_js -%}
File "c:\users\daan\appdata\local\programs\python\python37-32\share\jupyter\voila\templates\defaultnbconvert_templates\lab.tpl", line 19, in root


File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packagesnbconvert\exporters..\templates\skeleton\display_priority.tpl", line 14, in root
{%- elif type == 'image/png' -%}
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packagesnbconvert\exporters..\templates\skeleton\null.tpl", line 11, in root
File "c:\users\daan\appdata\local\programs\python\python37-32\share\jupyter\voila\templates\defaultnbconvert_templates\voila.tpl", line 64, in block_body
"kernelId": "{{kernel_id}}"
File "c:\users\daan\appdata\local\programs\python\python37-32\share\jupyter\voila\templates\defaultnbconvert_templates\voila.tpl", line 108, in block_body_loop
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\jinja2\runtime.py", line 473, in __next__
ctx._after = ctx._safe_next()
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\jinja2\runtime.py", line 450, in _safe_next
return next(self._iterator)
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\voila\handler.py", line 139, in _jinja_cell_generator
res = ep.preprocess_cell(cell, resources, cell_idx, store_history=False)
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packages\voila\execute.py", line 148, in preprocess_cell
result = super(VoilaExecutePreprocessor, self).preprocess_cell(cell, resources, cell_index)
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packagesnbconvert\preprocessors\execute.py", line 438, in preprocess_cell
reply, outputs = self.run_cell(cell, cell_index, store_history)
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packagesnbconvert\preprocessors\execute.py", line 571, in run_cell
if self._passed_deadline(deadline):
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packagesnbconvert\preprocessors\execute.py", line 541, in _passed_deadline
self._handle_timeout()
File "c:\users\daan\appdata\local\programs\python\python37-32\lib\site-packagesnbconvert\preprocessors\execute.py", line 504, in _handle_timeout
raise TimeoutError("Cell execution timed out")
TimeoutError: Cell execution timed out

This is solved in #240, pass --ExecutePreprocessor.timeout=180, if it does not solve your problem, feel free to reopen.

This is solved in #240, pass --ExecutePreprocessor.timeout=180, if it does not solve your problem, feel free to reopen.

Thanks, that fixed it immediately! I had found the other issues, but hadn't figured out how to pass it through Voil谩 yet. Thank you for the swift reply.

Passing the argument works in command line, but what if we want to open the voila dashboard from jupyter notebook. How do we proceed then ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Connect to existing kernel on subsequent accesses
Jul3k picture Jul3k  路  6Comments

404 : Not Found when running voila from jupyterlab
tylerburleigh picture tylerburleigh  路  6Comments

Incremental rendering of output and widgets
jeffyjefflabs picture jeffyjefflabs  路  10Comments

How to set a specific width and height for the output section ?
pingme998 picture pingme998  路  5Comments

New release with PR [#841]?
mcornudella picture mcornudella  路  6Comments