FAQ: Preventing Jupyter timeout errors when running notebooks as a batch/scheduled job

andrea.loweandrea.lowe Member, Moderator, Domino Posts: 27 mod
edited November 2019 in Q&A

If you are running a Jupyter notebook as a batch job, and it contains a long-running cell, you may encounter the following error:

[NbConvertApp] ERROR | Timeout waiting for execute reply (30s). If your cell should take longer than this, you can increase the timeout with: c.ExecutePreprocessor.timeout = SECONDS in jupyter_nbconvert_config.py

This indicates that the cell caused Jupyter to timeout. You can avoid this by configuring a longer timeout. Here's how to do it in the pre-setup script of a custom environment definition:

echo "c.ExecutePreprocessor.timeout = $SECONDS" >> /home/ubuntu/.ipython/profile_default/ipython_nbconvert_config.py
chown ubuntu:ubuntu /home/ubuntu/.ipython/profile_default/ipython_nbconvert_config.py

Substitute an appropriate value for $SECONDS. Note the chown command - this is needed because the pre-setup script runs as the root user, so the file ownership must be changed back to the ubuntu user in order to avoid a permissions error during your run. Keep in mind this is for batch runs.

Note: later versions of Jupyter require you to modify a different config file (/home/ubuntu/.jupyter/jupyter_nbconvert_config.py instead of /home/ubuntu/.ipython/profile_default/ipython_nbconvert_config.py). If you are running a recent Jupyter version and the above commands do not work, use this instead:

echo "c.ExecutePreprocessor.timeout = $SECONDS" >> /home/ubuntu/.jupyter/jupyter_nbconvert_config.py
chown ubuntu:ubuntu /home/ubuntu/.jupyter/jupyter_nbconvert_config.py


  • katie.shakmankatie.shakman Administrator, Domino Posts: 187 admin

    To fully remove the timeout, you can set SECONDS to -1. Here's an example:

    export SECONDS=-1
    echo "c.ExecutePreprocessor.timeout = $SECONDS" >> /home/ubuntu/.jupyter/jupyter_nbconvert_config.py
    chown ubuntu:ubuntu /home/ubuntu/.jupyter/jupyter_nbconvert_config.py

    In context on the compute environment definition page, this looks like:


    Customer Success Engineer @ Domino

Sign In or Register to comment.