shim: 5xx flaps park a key 15s, not 60s (a live upstream must not dry the pool); guide note
This commit is contained in:
@@ -173,8 +173,10 @@ class H(BaseHTTPRequestHandler):
|
||||
mark_dead(k, 600)
|
||||
last = (code, err)
|
||||
continue
|
||||
if code in (429, 500, 502, 503, 504):
|
||||
mark_dead(k, 60)
|
||||
if code == 429:
|
||||
mark_dead(k, 30) # rate limit: короткая пауза
|
||||
elif code in (500, 502, 503, 504):
|
||||
mark_dead(k, 15) # upstream flap: не вина ключа, пауза минимальная
|
||||
last = (code, err)
|
||||
continue
|
||||
return self._relay(code, err)
|
||||
|
||||
Reference in New Issue
Block a user