Further timeouts and resource limiting.
See original GitHub issue- --timeout-request-start (Timeout unless request headers complete within this time. ~10s)
- --timeout-request-complete (Timeout if request body is still being read after this time. ~60s)
- ~–limit-request-line-size (4096, See gunicorn)~
- ~–limit-request-header-size (8190, See gunicorn)~
- ~–limit-request-header-count (100, See gunicorn)~
- --limit-ws-message-size
@Kludex notes
- We are not going to implement
--limit-request-header-count
. The header size limitation is enough. - Should we consider timeout on
startup
andshutdown
lifespans?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Tuning Resource Limits - GeoServer Training - GeoSolutions
Resource limits are settings to be configured for individual OGC services to ... for more than 2 or 3 seconds for a WMS...
Read more >Error message when you execute a linked server query in ...
Execution terminated by the provider because a resource limit was reached. ... section of this article for further details about the timeout options....
Read more >How to fix: Lack of resources and Rate Limiting - Strike Security
Checklist to know if your API is vulnerable: Missing execution timeouts limits. Missing max allocable memory limits. Missing number of file descriptors limits....
Read more >How to Fix the 504 Gateway Timeout Error on Your Site - Kinsta
You can edit your server config files to increase resource limits for specific directives. This can help you resolve the 504 Gateway Timeout...
Read more >Limiting time and memory consumption of a program in Linux
Without further ado, the 14 kilobyte standalone Perl script that limits a ... most Linux systems can be found at pshved/timeout GitHub project....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think
--limit-request-header-size
can be considered equivalent toh11-max-incomplete-event-size
in theh11
implementation, which we already have.EDIT: Actually, the
h11-max-incomplete-event-size
is a replacement for both--limit-request-header-size
and--limit-request-line-size
:Ref.: https://h11.readthedocs.io/en/latest/api.html#h11.Connection
Hello,
Apologies for chiming in on this, but my use case could really use this feature. I have a very large sql query that uses sqlalchemy (so it is not async, from the start). This is an internal “big data” app, so there is no pressure for super low latency per request. I’m streaming lines of json with a starlette
StreamingResponse
from afastapi
application.However, the query takes about 90-120 seconds to get started actually producing results.
uvicorn
appears to time out, whether i run it directly or under gunicorn.daphne
has a timeout arg, so i’m using that now. I’d really like to use uvicorn as a work in gunicorn, to get easy multi-process service.Anyway, I just wanted to bump this. If you pointed me to the code where the timeout actually occurs, I might be interested in trying a PR, if you’d be interested (at least for the
request start
, and the others if they fall out easily).Thanks!