Why I am getting "connection timed out" from Gradio?

I am running a space the uses ZeroGPU. It allocated 600 secs of GPU for my job. But when in the middle of the execution after 4-5 mins, suddenly I am getting “connection timed out” error with message in the log “Stopping nodeJS server”.

But the execution is still in progress and even GPU is being utilised. But I unable to get any output in the Gradio UI even clicks not working and returns “connection timed out” error. Also log freezes.

I tried multiple times still same error. Even i have GPU quota remaining.

Why this error comes? Is this related to Spaces or Gradio ? Please help me.

2 Likes

In many cases, a connection error occurs when the Spaces process crashes.

By the way, I think that the maximum quota you can specify is currently 180 seconds. If you specify a higher value, it won’t crash immediately, but I think the behavior is undefined.

1 Like

ooh. Where that limits are documented ? @John6666

1 Like

Where that limits are documented ?

Not documented… from the community…:cold_face:

If your process is taking longer than expected (for example, if the computation is resource-intensive and GPU-heavy), the Gradio interface might time out waiting for a response, even though your GPU is still being utilized. This could be due to limited server resources or a problem with how the Space is handling long-running tasks.
Check if there are any memory or resource limitations on the server that might be causing delays. If you’re running an intensive computation, consider optimizing the code to reduce the processing time, or breaking it into smaller chunks.

1 Like

@ValdeJunior

I need GPU for long time like 600 secs since I run multiple image generation models one by one.

And the Gradio UI gets updates from the program like Progress bar.

1 Like

Can you please provide some links of that?

1 Like

It’s a bit old, but sometimes the 180-second setting works. If it exceeds 240 seconds, it usually fails.

If you want to know the exact thing, mention it to hysts.

1 Like

Thanks. Does this limit only for ZeroGPU spaces or for all paid GPUs ?

And, does ZeroGPU supports multi gpu configs ? if yes, for duration works?

1 Like

Does this limit only for ZeroGPU spaces or for all paid GPUs

Only for Zero GPU. The quota and spaces decorators are specific to Zero GPU space and are not related to pay-as-you-go GPU space or CPU space.
This is a bug or specification that occurs because Zero GPU space is a service that shares GPUs and has an acrobatic implementation.:sweat_smile:

does ZeroGPU supports multi gpu configs ?

Some people say this support it, but I’ve never tried it myself and I don’t know how to set it up.:thinking:
You might be able to find out by asking in the community.

okay. So, if I am running in paid Nvidia L40S, then should I need to remove the decorators ?

1 Like

then should I need to remove the decorators ?

Yea. As far as I can tell from looking at CPU space, etc., I think it has become possible to run without explicitly deleting it recently, but I don’t have any proof. If an error occurs, I think you can just delete it.

1 Like