Here’s the result from using @minrk 's config ; IMO, the most interesting test I did lately.
2023-08-30 10:08:57,985 Starting server test-user
2023-08-30 10:08:58,178 Server test-user is pending spawn
2023-08-30 10:08:58,199 Progress 0%: Server requested
2023-08-30 10:08:58,200 Progress 10%: 0.0s...
2023-08-30 10:08:59,204 Progress 20%: 1.0s...
2023-08-30 10:09:00,205 Progress 30%: 2.0s...
2023-08-30 10:09:01,206 Progress 40%: 3.0s...
2023-08-30 10:09:02,210 Progress 50%: 4.0s...
2023-08-30 10:09:03,211 Progress 60%: 5.0s...
2023-08-30 10:09:04,214 Progress 70%: 6.0s...
2023-08-30 10:09:05,217 Progress 80%: 7.0s...
2023-08-30 10:09:06,218 Progress 90%: 8.0s...
2023-08-30 10:09:07,221 Progress 100%: 9.0s...
2023-08-30 10:09:08,225 Progress 110%: 10.0s...
2023-08-30 10:09:09,228 Progress 120%: 11.0s...
2023-08-30 10:09:10,232 Progress 130%: 12.0s...
2023-08-30 10:09:11,237 Progress 140%: 13.0s...
2023-08-30 10:09:12,241 Progress 150%: 14.0s...
2023-08-30 10:09:13,245 Progress 160%: 15.0s...
2023-08-30 10:09:14,249 Progress 170%: 16.0s...
2023-08-30 10:09:15,252 Progress 180%: 17.1s...
2023-08-30 10:09:16,256 Progress 190%: 18.1s...
2023-08-30 10:09:38,537 Progress 100%: Spawn failed: Server at http://127.0.0.1:42365/user/test-user/ didn't respond in 30 seconds
Traceback (most recent call last):
File "/etc/jupyterhub/test_progress/start_server.py", line 123, in <module>
main()
File "/etc/jupyterhub/test_progress/start_server.py", line 117, in main
start_server(session, hub_url, user)
File "/etc/jupyterhub/test_progress/start_server.py", line 79, in start_server
raise ValueError(f"{log_name} never started!")
ValueError: test-user never started!
While it eventually fails, it shows that progress() works as expected - at least locally, connecting to the hub directly (127.0.0.1:8000).
This is what I get using the proper hub URL:
2023-08-30 10:20:37,579 Starting server test-user
2023-08-30 10:20:37,907 Server test-user is pending spawn
2023-08-30 10:21:18,252 Progress 0%: Server requested
2023-08-30 10:21:18,254 Progress 10%: 0.0s...
2023-08-30 10:21:18,254 Progress 20%: 1.0s...
2023-08-30 10:21:18,255 Progress 30%: 2.0s...
2023-08-30 10:21:18,255 Progress 40%: 3.0s...
2023-08-30 10:21:18,256 Progress 50%: 4.0s...
2023-08-30 10:21:18,256 Progress 60%: 5.0s...
2023-08-30 10:21:18,256 Progress 70%: 6.0s...
2023-08-30 10:21:18,256 Progress 80%: 7.0s...
2023-08-30 10:21:18,257 Progress 90%: 8.0s...
2023-08-30 10:21:18,257 Progress 100%: 9.0s...
2023-08-30 10:21:18,257 Progress 110%: 10.0s...
2023-08-30 10:21:18,258 Progress 120%: 11.0s...
2023-08-30 10:21:18,258 Progress 130%: 12.0s...
2023-08-30 10:21:18,258 Progress 140%: 13.0s...
2023-08-30 10:21:18,259 Progress 150%: 14.0s...
2023-08-30 10:21:18,259 Progress 160%: 15.0s...
2023-08-30 10:21:18,259 Progress 170%: 16.1s...
2023-08-30 10:21:18,259 Progress 180%: 17.1s...
2023-08-30 10:21:18,260 Progress 190%: 18.1s...
2023-08-30 10:21:18,260 Progress 100%: Spawn failed: Server at http://127.0.0.1:38097/user/test-user/ didn't respond in 30 seconds
Traceback (most recent call last):
File "/etc/jupyterhub/test_progress/start_server_https.py", line 123, in <module>
main()
File "/etc/jupyterhub/test_progress/start_server_https.py", line 117, in main
start_server(session, hub_url, user)
File "/etc/jupyterhub/test_progress/start_server_https.py", line 79, in start_server
raise ValueError(f"{log_name} never started!")
ValueError: test-user never started!
All progress messages appears in one shot when the spawn eventually fails. The main difference here is that start_server.py connects to the hub via nginx (nginx is proxying for the hub and managing the SSL layer)
My guess is that my nginx config is missing something that would let the progress notification go back to the user’s browser as they are generated. Am I going in the right direction?
EDIT: I have not looked into it, but I’m mostly sure the spawn fails because there are no single user server module installed on this server (it’s just a hub) - I don’t think it is relevant in this test anyway.