Frequently, our users are having a time out issue when they launch JupyterLab.
TTT - Thu Feb 1 08:37:21 EST 2024
TIMING - Starting jupyter at: Thu Feb 1 08:37:21 EST 2024
+ export XDG_RUNTIME_DIR=
+ XDG_RUNTIME_DIR=
+ jupyter lab --config=/home/rz3jr/ondemand/data/sys/dashboard/batch_connect/sys/jupyter_lab/output/f0ff26ee-9aff-4d18-9f84-06f957e4c6f5/config.py --notebook-dir=/home/rz3jr
Timed out waiting for Jupyter Notebook server to open port 54645!
TIMING - Wait ended at: Thu Feb 1 08:38:09 EST 2024
Cleaning up...
When I checked the TIMING.
TIMING - Starting jupyter at: Thu Feb 1 08:37:21 EST 2024
TIMING - Wait ended at: Thu Feb 1 08:38:09 EST 2024
What is the default time out for the session? Is it possible to increase the time out value?
Looking at the Juypter docs, which are not as clear as I hoped, they seem to timeout after 30s or not at all. So, I’m not sure.
The docs are saying that MappingKernelManager.cull_idle_timeout : Int is what sets this but they also claim it’s set to 0 by default and therefore disabled, but that doesn’t sound like what you are experiencing.
Try adding that line yourself in the before.sh like this:
# Generate Jupyter configuration file with secure file permissions
(
umask 077
cat > "${CONFIG_FILE}" << EOL
c.KernelSpecManager.ensure_native_kernel = False
...
# Try hard setting the timeout to 0 and prevent culling
# if that still doesn't work increase the number
MappingKernelManager.cull_idle_timeout : 0
...
EOL
)
If setting it to 0 first doesn’t stop the problem, which is supposed to be the default and disable culling, see what happens when you increase to 60 and if it is longer than 30 seconds.
If that doesn’t work the other setting I’d try and add to the before.sh like above would be the MappingKernelManager.kernel_info_timeout : Float which defaults to 60 seconds and is the timeout for giving up on a kernel (in seconds).
I applied the setting but I didn’t see any change. I will do more tests.
I have another question regarding Requirements — Open OnDemand 3.0.3 documentation
It says “The Passenger apps that make up the core of OnDemand (that NGINX is configured with), are each killed after a short period (5 minutes) of inactivity from the user,” Does it mean OSC runs “nginx_stage nginx_clean” every 5min? I see it every 2 hours in our cron setting.
No, I think those docs are just old maybe and out of date. I’ve never had a timeout from walking away for 5 mins of my entire PUN. I’ve created a doc ticket to look into what’s there and fix it:
I wonder if you adjust the ProxyTimeout in the script.sh if that would catch the issue. Maybe apache is what is timing out and not Jupyter would be my thinking here.