Skip to content

Allow for additional, or alternative, options for proxy request #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2018

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