Memory restrictions caused failure TLJH install failure on AWS EC2
See original GitHub issueI have tried multiple times to install TLJH on an AWS EC2 instance, failing every time. The process has thrown a number of different errors, but the most common appears to be with conda installation.
Error logs
ubuntu@ip-172-31-91-142:~$ curl https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo -E python3 - --admin cfarr
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6354 100 6354 0 0 45385 0 --:--:-- --:--:-- --:--:-- 45385
Checking if TLJH is already installed...
Setting up hub environment
Installed python & virtual environment
Set up hub virtual environment
Setting up TLJH installer...
Setup tljh package
Starting TLJH installer...
Setting up admin users
Granting passwordless sudo to JupyterHub admins...
Setting up user environment...
Downloading & setting up user environment...
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 508, in <module>
main()
File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 491, in main
ensure_user_environment(args.user_requirements_txt_url)
File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 272, in ensure_user_environment
'conda==' + conda_version
File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/conda.py", line 109, in ensure_conda_packages
] + packages).decode()
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/opt/tljh/user/bin/python', '-m', 'conda', 'install', '-c', 'conda-forge', '--json', '--prefix', '/opt/tljh/user', 'conda==4.8.1']' died with <Signals.SIGKILL: 9>.
I was following the guide to install on your own server and had run the following:
sudo -E apt install python3 python3-dev git curl
which failed, Ubuntu suggest I run the following:
sudo apt-get update
which succeeded, so I re-ran the following:
sudo -E apt install python3 python3-dev git curl
which succeeded, so I ran the TLJH install:
curl https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo -E python3 - --admin cfarr
which threw the above error.
Any and all help is appreciated!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Troubleshoot EC2 Linux instance that failed a status check ...
My Amazon Elastic Compute Cloud (Amazon EC2) Linux instance failed its instance status check due to over-utilization of its resources.
Read more >Setting up JupyterHub on AWS | Saturn Cloud Blog
This step-by-step walkthough covers how to install JupyterHub for your ... isn't suggested for production is the scaling limitation of TLJH.
Read more >Troubleshooting issues on Amazon Web Services
This is an incomplete list of issues people have run into when running TLJH on Amazon Web Services (AWS), and how they have...
Read more >Choosing the Right JupyterHub Infrastructure
Due to the customizability and scale it provides, the setup and maintenance for this option is ... Scale, 1 GB data limit, 4...
Read more >Troubleshooting — JupyterHub 3.1.0 documentation
When troubleshooting, you may see unexpected behaviors or receive an error message. This section provides links for identifying the cause of the problem...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, the read the docs states this “The AWS free tier is fully capable of running a minimal littlest Jupyterhub for testing purposes.”, but to me it seems that the 1 GB free tier instance on AWS (t2.micro) is not sufficient, or is at best “barely sufficient”, to install tljh, and the installation is likely to fail in unpredictable ways.
Installing from User Data results in a hang in “Setting up user environment…”.
Installing from a terminal with "curl https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo -E python3 - --admin "
resulted in
with subsequent attempts getting further:
where the log file ends in:
and further attempts eventually succeeded, after long hang times with “top” showing kswapd0 dominating the CPU, and “free” showing only 60 MB free.
Cheers,
Tim
We have recently updated the memory requirements described in the documentation, as well as made updates that reduces the memory footprint. Since this issue relates to memory it seems, I’ll go for a close.