mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-11 22:52:54 +00:00
Enhance CommitSessionMiddleware to allow health probes to bypass session management, ensuring faster and more reliable responses. (#24384)
This commit is contained in:
parent
23ff9943a9
commit
b63da90ae4
1 changed files with 7 additions and 0 deletions
|
|
@ -88,6 +88,13 @@ class CommitSessionMiddleware:
|
|||
await self.app(scope, receive, send)
|
||||
return
|
||||
|
||||
path = scope.get('path', '')
|
||||
# Keep health probes independent from sync session commit/remove
|
||||
# so DB pressure cannot delay or fail probe responses.
|
||||
if path in {'/health', '/ready', '/health/db'}:
|
||||
await self.app(scope, receive, send)
|
||||
return
|
||||
|
||||
try:
|
||||
await self.app(scope, receive, send)
|
||||
except BaseException:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue