Interrupt / restart pending spawn?

Is there a way to interrupt a spawning server that is stuck? If I try to select “Stop My Server” from hub/home endpoint, the Jupyterhub simply says:

API request failed (400): cboettig is pending spawn, please wait

However, the spawn page is simply stuck (in this case, insufficient resources).

I know that spawn will eventually timeout and I will be able to relaunch. But I would love a way to abandon the spawn without having to wait for the timeout (e.g. I have accidentally requested too large an image, I don’t want to wait for the timeout once I see insufficient resources, I simply want to go back to my spawn page and request a new image with fewer resources). Is it possible to do this already? If not, would it be reasonable to request this feature?

It is not possible, but it is totally reasonable to request this. It has been requested here.

The enforcement is here and it may be true that it can just be removed. It is there out of an abundance of caution to avoid multiple pending transitions at the same time. To remove the check, we’d need to make sure that the start process handles everything correctly if stop happens while it’s waiting for start). Adding a notification channel may be sufficient, but we’d also need to handle all the possible pending stages of start/proxy/etc.

Thanks much, makes sense. I’ll keep an eye on that issue you linked above. And meanwhile I will learn to be more patient to let startups time out… (who am I kidding? now that I’ve enabled named servers I will no doubt just go and launch more new server requests whenever one is waiting to time out :upside_down_face: )

I’ll also add, if launch is failing and taking too long to notice, it’s possible there’s something that can be fixed in the Spawner to notice more promptly. Some failure modes can be hard to distinguish from a timeout, but if you can share some logs/errors/inspection, we might be able to turn those failures into errors when they happen.