Skip to content
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

try not limit container resource #117

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion config/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Refer to the JupyterHub documentation for more information:
https://jupyterhub.readthedocs.io/en/latest/tutorial/getting-started/config-basics.html
https://jupyterhub.readthedocs.io/en/stable/reference/config-reference.html

Refer to DockerSpawner documentation for dockerspawner settings information:
https://jupyterhub-dockerspawner.readthedocs.io/en/latest/api/index.html#dockerspawner-api
"""

import os
Expand Down Expand Up @@ -50,14 +53,16 @@
c.DockerSpawner.cpu_limit = 4
c.DockerSpawner.mem_limit = '16G'

c.DockerSpawner.http_timeout = 120 # 2 minutes (default is 30 seconds)
c.DockerSpawner.start_timeout = 300 # 5 minutes (default is 60 seconds)
Comment on lines +56 to +57
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add comments describing what each timeout is waiting for? Is http_timeout waiting to make contact with the new container, and start waiting for the container to publish it's status as started or something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a ref link in the overhead section. I don’t think every setting needs to be documented.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A ref link is fine


# The network name that Docker containers will use to communicate
network_name = os.environ.get('NETWORK_NAME')
if network_name:
c.DockerSpawner.network_name = network_name
c.DockerSpawner.use_internal_ip = True
environment = os.environ.get('ENVIRONMENT', 'prod').lower()
# for troubleshooting purposes, keep the container in non-prod environment
# ref: https://jupyterhub-dockerspawner.readthedocs.io/en/latest/api/index.html#dockerspawner.DockerSpawner.remove
c.DockerSpawner.remove = environment != 'dev'
c.DockerSpawner.debug = True

Expand Down
Loading