ERROR: "WebSocket is already in CLOSING or CLOSED state" terminal timeout in Jupyter

I’m running Jupyter in a docker container on a Dataproc cluster, and I find that the terminal is timing out after two minutes, regardless of activity. It just becomes unresponsive after two minutes, and if you go into the developer’s console it says

WebSocket is already in CLOSING or CLOSED state.

Reloading the page resolves this, but then will time out again in another two minutes. I’m running jupyter notebook version 5.7.8 and tornado 4.5.3.