RPC circuit breaker for InstantAdPay: bench a failing provider for 10 min, 4 s timeout on eth_call, log provider failures; log any request over 3 s (members felt slow sign-ins; the sticky index was paying the 15 s timeout on every call when a node hung)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-12 11:29:31 -05:00
parent a63f6206a3
commit f417d416da
2 changed files with 20 additions and 14 deletions
+1
View File
@@ -1691,6 +1691,7 @@ async function gameAnswer(g, slug, acct) { // the game token (only once a userna
}
const server = http.createServer(async (req, res) => {
{ const t0 = Date.now(); res.on('finish', () => { const ms = Date.now() - t0; if (ms > 3000) console.warn('slow request', req.method, String(req.url || '').split('?')[0].slice(0, 80), ms + 'ms', res.statusCode); }); } // visibility for member-felt delays (2026-10-12)
try {
const u = new URL(req.url, 'http://x');
const p = u.pathname;