mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-23 15:09:22 +03:00
keep uvicorn idle connections open longer than nginx's upstream keepalive
uvicorn closed idle connections after its 5s default while nginx kept them pooled for 60s, so a request nginx sent on a connection uvicorn was closing got a 502. nginx retries that on a fresh connection for most methods, but not for POST or PATCH.
This commit is contained in:
@@ -731,6 +731,8 @@ class FrigateApp:
|
|||||||
host="127.0.0.1",
|
host="127.0.0.1",
|
||||||
port=5001,
|
port=5001,
|
||||||
log_level="error",
|
log_level="error",
|
||||||
|
# outlive nginx's 60s upstream keepalive so nginx closes idle connections first
|
||||||
|
timeout_keep_alive=75,
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
self.stop()
|
self.stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user