Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 timeout problem #3185

Closed
1 task done
camenduru opened this issue Feb 13, 2023 · 4 comments
Closed
1 task done

🚨 timeout problem #3185

camenduru opened this issue Feb 13, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@camenduru
Copy link
Contributor

Describe the bug

working

import gradio as gr
def fun():
    start_time = time.time()
    while time.time() - start_time < 59:
        pass
    msg = "This is sample markdown message"
    return msg
with gr.Blocks() as demo:
    b1 =gr.Button()
    text_out = gr.Textbox()
    b1.click(fun, [], [text_out])
demo.launch(debug=True, share=True, inline=False)

not working

import gradio as gr
def fun():
    start_time = time.time()
    while time.time() - start_time < 61:
        pass
    msg = "This is sample markdown message"
    return msg
with gr.Blocks() as demo:
    b1 =gr.Button()
    text_out = gr.Textbox()
    b1.click(fun, [], [text_out])
demo.launch(debug=True, share=True, inline=False)

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

colab

Screenshot

No response

Logs

no log

System Info

3.18.0

Severity

blocking all usage of gradio

@camenduru camenduru added the bug Something isn't working label Feb 13, 2023
@camenduru camenduru changed the title timeout problem 🚨 timeout problem Feb 13, 2023
@camenduru
Copy link
Contributor Author

inline=True working maybe we should send more wake-up signal over websocket idk how maybe 60 seconds default timeout for gradio.live

@abidlabs
Copy link
Member

Hi @camenduru what happens when you enable the queue?

In other words, replace demo.launch(debug=True, share=True, inline=False) with demo.queue().launch(debug=True, share=True, inline=False)

Enabling the queue is required for inference times > 60 seconds: https://gradio.app/key-features/#queuing

@camenduru
Copy link
Contributor Author

it is working 🥳 thanks @abidlabs

@FurkanGozukara
Copy link

demo.queue().launch(debug=True, share=True, inline=False)

when i enable queue i almost get immediately time out on runpod

when not enabled it works but this time i get timeout when it takes longer than 1 minute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants