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

Feature request: Timeout option #1276

Closed
1 of 2 tasks
caleb15 opened this issue Dec 2, 2021 · 1 comment
Closed
1 of 2 tasks

Feature request: Timeout option #1276

caleb15 opened this issue Dec 2, 2021 · 1 comment

Comments

@caleb15
Copy link

caleb15 commented Dec 2, 2021

Checklist

  • There are no similar issues or pull requests for this yet.
  • I discussed this idea on the community chat and feedback is positive. (I brought this up twice in chat but only received one response)

Is your feature related to a problem? Please describe.

I want to time out long-running requests to prevent a DDOS attack from happening.

Describe the solution you would like.

A timeout option to end requests after X seconds.

Describe alternatives you considered

  • Using Gunicorn, but gunicorn is not needed as we already have a process management system in the form of kubernetes. Also we had an issue with using gunicorn.
  • Using Nginx, but if nginx ends the connection the request might still keep on running? (Not sure about this one)
  • Timing out the connection in our Django codebase. This can probably be done but it would be nice if it was a default feature of uvicorn so everyone else could easily set it as well.

Additional context

There is precedent for this feature as Uwsgi had this option.

@caleb15 caleb15 changed the title Timeout option Feature request: Timeout option Dec 2, 2021
@Kludex
Copy link
Member

Kludex commented Dec 3, 2021

PR is welcome.

It's one of the features needed for 1.0. :)

I'll consider this as a duplicated of #157, even if it's a subset, and I'll close the issue.

@Kludex Kludex closed this as completed Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants