RPC circuit breaker for LinkSpin: bench a failing provider for 10 min, 4 s timeout on eth_call, log provider failures; log any request over 3 s

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-12 11:30:13 -05:00
parent c2178b4c6e
commit a37ac0b749
2 changed files with 20 additions and 14 deletions
+1
View File
@@ -911,6 +911,7 @@ function curtained(req, res, u) {
}
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;