nbgrader icon indicating copy to clipboard operation
nbgrader copied to clipboard

TimeoutError: Timeout waiting for IOPub output

Open davidnero opened this issue 6 years ago • 8 comments

Operating system

Windows 10

nbgrader --version

0.6.0

Expected behavior

The command nbgrader autograde --force "Homework XX" --student abc123 should work for well-formed notebooks.

Actual behavior

About ~20% of the time it fails with TimeoutError: Timeout waiting for IOPub output Running the same notebooks with the web interface works about 50% of the time. If I keep trying it works eventually.

Steps to reproduce the behavior

Run enough notebooks. I searched for the issue but couldn't find anything under open issues. Is it just me?

davidnero avatar Sep 28 '19 15:09 davidnero

Could you share a notebook that this happens with?

jhamrick avatar Nov 02 '19 09:11 jhamrick

It's not consistent with any particular notebook. What I've since found is that setting my PC's power mode to "Best Performance" (on Windows 10) makes the issue completely disappear.

It might have something to do with how the timeout is calculated. It's not just that it takes too long. When it does fail, it usually does it within a few seconds.

davidnero avatar Nov 22 '19 18:11 davidnero

for info, catched this zmq timeout on conda-forge OSX CI platform

Probably due to an unresponsive OS.

FabriceSalvaire avatar Jun 06 '20 20:06 FabriceSalvaire

It's not consistent with any particular notebook. What I've since found is that setting my PC's power mode to "Best Performance" (on Windows 10) makes the issue completely disappear.

Can confirm, at least for the Validate function. For a grading notebook I am working on, I will sometimes receive the IOPub timeout error described by the OP, while other times I would receive NameError: <variable name> not found on variables defined earlier in the notebook. Everything works correctly (without error) when I 'Run All' cells.

After I simply plugged in my laptop, the Validate errors stopped. (I assume Best Performance is enabled automatically.)

mgaree avatar Jan 12 '22 16:01 mgaree

I also run into the issue Timeout waiting for IOPub output for some of my student submissions. I haven't looked into it in enough detail to find out what is causing it. It occured with student submissins that generated a lot of outputs (plots, print statements, etc.). It might be related, but it could also be a coincidence.

RonaldEnsing avatar Mar 18 '22 14:03 RonaldEnsing

I also run into the issue Timeout waiting for IOPub output for some of my student submissions. I haven't looked into it in enough detail to find out what is causing it. It occured with student submissins that generated a lot of outputs (plots, print statements, etc.). It might be related, but it could also be a coincidence.

@RonaldEnsing Dear CoR colleague, have you found a solution to this problem? I am encountering this issue for computational expensive cells. However, I am struggling of increasing the timeout.

mstoelzle avatar Jan 31 '23 21:01 mstoelzle

No, I haven't looked any further into this.

RonaldEnsing avatar Feb 01 '23 09:02 RonaldEnsing

No, I haven't looked any further into this.

I actually fixed it last night. In case you encounter the same / a similar issue in the future again:

Opposite to the official documentation, setting c.ExecutePreprocessor.timeout = 60 in the nbgrader_config.py file doesn't seem to have any effect and the timeout remains at 30s. What helps instead, is adding a line c.Execute.timeout = 60 # s to the config.

mstoelzle avatar Feb 01 '23 09:02 mstoelzle