[Bug]: raise socket.error("Socket is closed") OSError: Socket is closed
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Many image previews in Google Colab cause a socket is closed error, and the image times out while loading.
Steps to reproduce the problem
- Run WebUI on Colab
- Generate a larger image, certain grids of 4x4 512x768 are usually enough to trigger it if detailed enough
- Image begins to load, and then times out
What should have happened?
Seems like the time out duration is way too short. I am not sure if this is a Google Colab limitation, or some kind of issue with Gradio. I do know that switching to e.g. interlaced (progressive) PNGs is not the solution, as those files are even larger, so the timeout will happen sooner/more frequently.
I tried to look in Gradio's code to see if there was anything that could be modified to potentially adjust timeout with a launch flag, but I'm not sure which time-out is correct.
If I were a betting man, I'd bet it was this one? https://github.com/gradio-app/gradio/blob/main/gradio/networking.py
r = requests.head(url, timeout=3, verify=False)
https://github.com/gradio-app/gradio/blob/main/gradio/external_utils.py https://github.com/gradio-app/gradio/blob/main/ui/packages/app/src/main.ts
it sounds like #5422 was meant to address this same issue?
Commit where the problem happens
5927d3fa95e9ae43252d598f7791ca26cfcad5e3
What platforms do you use to access UI ?
Other/Cloud
What browsers do you use to access the UI ?
Mozilla Firefox, Google Chrome, Microsoft Edge
Command Line Arguments
--share --gradio-debug --gradio-auth RE:DACTED --enable-insecure-extension-access --no-half-vae
Nothing in particular that would affect it.
Additional information, context and logs
I know disabling image previews wholesale will prevent it from happening, and I think it might be some kind of Gradio issue, but I'm not sure how to better help troubleshoot it.
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues?q=is%3Aissue+socket+closed couldn't find anything