I haven’t been able to find anything that specifically gets at this problem.
c.Spawner.http_timeout = 30 # or whatever number of seconds to wait
The hook I have running attempts to install kernels for every virtual environment (whether it’s Python or Julia). This can take a non-trivial time, but I’m curious if there’s a way to sidestep the need to specify a really long
http_timeout (in my case, setting it to
300 seconds is sufficient, but depending on the number of virtual environments that exist, it might not be enough).
I certainly understand the need to specify an
http_timeout for spawners, however, the hooks aren’t actually related to the spinning up a singleuser notebook. So it seems a little odd to me that the
http_timeout is intended to cover any and all things leading up the launch, since some of these things could be variably long. (e.g., I have 12 virtual environments, whereas the other users on my server only have 2-4, at the moment.)
So, my questions:
- Is it possible to specify a timeout that strictly considers the attempt to launch the server and not the hooks?
- If there isn’t anything like this, what might be some approaches that could allow for similar behavior to this? (I’m not super familiar with JupyterHub, so I’m at a loss as to whether there might be some way to signal to JupyterHub (from the singleuser server) that things went wrong, but otherwise allow an unlimited timeout – this last bit feels very wrong to do, but that’s also a pretty arbitrary feeling.)