Skip to content

Conversation

@nokome
Copy link
Contributor

@nokome nokome commented Nov 19, 2018

This change allows handler classes that extend LocalProxyHandler to specify additional, or alternative, arguments to tornado.httpclient.HTTPRequest when proxying.

For example, this was needed so that we could increase the request_timeout in https://github.com/minrk/nbstencilaproxy to handle the execution of long running cells.

nokome pushed a commit to nokome/nbstencilaproxy that referenced this pull request Nov 19, 2018
Currently executing cells in a Stencila  document that run for longer than 20s (the tornado default) will fail with status code 500 and message "Timeout during request". e.g.

```python
import time
time.sleep(25)
```

This (arbitrarily) increases the timeout to 1hr. It relies on this PR upstream jupyterhub/jupyter-server-proxy#56.

It can be tested in `repo2docker` using:

```
${NB_PYTHON_PREFIX}/bin/pip install --no-cache   --process-dependency-links https://github.com/nokome/nbstencilaproxy/archive/master.tar.gz &&
```

The `dependency_links` can be dropped in `setup.py`, if the upstream PR gets merged.
@ryanlovett ryanlovett merged commit f020e78 into jupyterhub:master Nov 19, 2018
@ryanlovett
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants