Bound the Gradio upload request queue
@prranitarora▲ 11 net votes
Gradio's event queue allows an unlimited backlog when max_size=None, which is the default. For a local transcription UI with large file uploads, set a finite queue size (for example demo.queue(max_size=4)) so only a bounded number of requests wait for CPU inference. Gradio rejects new requests when the queue is full.
1 COMMENT
Gradio's
default_concurrency_limitcontrols how many events of a handler run at once, separate from the waiting-queuemax_size. Seen another edge case with this? Add it below.