jupyter / tmpnb

Creates temporary Jupyter Notebook servers using Docker containers. [DEPRECATED - See BinderHub project]
https://github.com/jupyterhub/binderhub
BSD 3-Clause "New" or "Revised" License
528 stars 123 forks source link

How to overcome "No Vacancy" message? #265

Closed rwmajor2 closed 7 years ago

rwmajor2 commented 7 years ago

I have tmpnb running on an AWS instance and users are starting to use it more. Very frequently now I am getting the "No Vacancy" message that tmpnb is full. I am starting tmpnb using the documented statements of how to quickly get started, eg.

export TOKEN=$( head -c 30 /dev/urandom | xxd -p ) docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=proxy jupyter/configurable-http-proxy --default-target http://127.0.0.1:9999 docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=tmpnb -v /var/run/docker.sock:/docker.sock jupyter/tmpnb

How can I start this up so I have more containers or capacity for users?

rwmajor2 commented 7 years ago

So, after further research, I have tried to use the following command:

docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=tmpnb -v /var/run/docker.sock:/docker.sock jupyter/tmpnb python orchestrate.py --command='jupyter notebook --no-browser --NotebookApp.base_url=/{base_path} --NotebookApp.port_retries=0 --NotebookApp.token="" --NotebookApp.disable_check_xsrf=True --pool-size=20 --cull-timeout=900 --cull-max=1800 --NotebookApp.trust_xheaders=True'

However, I now get a 503 error. I have tmpnb running on an AWS instance, fronted by a Load Balancer routing port 80 traffic to 8000. When using docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=tmpnb -v /var/run/docker.sock:/docker.sock jupyter/tmpnb it all works fine. I am just trying to find a way to add more containers so I don't get the No Vacany message.

rwmajor2 commented 7 years ago

Proper way to do this is noted below.

docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=tmpnb -v /var/run/docker.sock:/docker.sock jupyter/tmpnb python orchestrate.py --pool-size=50 --cull-timeout=900 --cull-max=1800