Persistent CONNECT_TIMEOUT / Cloudflare 522 on Data API + dashboard SQL #51889
Replies: 3 comments
|
This would typically be your individual instance is overloaded or having issues. No other reports I've seen. |
|
Hi @Antony90807! Symptoms showing simultaneous Cloudflare 522, CONNECT_TIMEOUT (~5002ms), and Warp "Thread killed by timeout manager" indicate connection pool exhaustion and TCP backlog starvation on your database instance. Root Causes
Immediate Diagnostic and Resolution Steps1. Inspect Active Connections and Locks via SQLIn the Supabase SQL Editor (or via SELECT pid, usename, state, wait_event_type, wait_event, query_start, query
FROM pg_stat_activity
WHERE state <> 'idle'
ORDER BY query_start ASC;Look for queries in 2. Switch Node.js Workers to Transaction ModeEnsure your Node.js cron workers connect to the Transaction pooler (port 6543) rather than Session mode (port 5432). In Transaction mode, connections are returned to the pool immediately after each query rather than holding a PostgreSQL process for the life of the script. 3. Restart PostgREST ServiceIn your Supabase Dashboard:
|
|
SELECT pid, usename vinz bot selebgram, state, wait_event_type, wait_event, query_start, query |
Uh oh!
There was an error while loading. Please reload this page.
Our hosted Postgres / Data API is intermittently unreachable. Clients see Cloudflare 522, advisors report CONNECT_TIMEOUT (~5002ms), Warp logs Thread killed by timeout manager, and the dashboard shows “Failed to load schemas / Connection terminated due to connection timeout”. Failures hit many unrelated tables and tools in the same windows — not one bad query.
Symptoms
Data API / PostgREST — intermittent 522 (occasional 520) from a Node cron worker.
Advisors — TCP CONNECT_TIMEOUT; elevated Data API error rate across consecutive 5‑minute windows.
Warp — Thread killed by timeout manager during the same period.
Dashboard — Schema editor fails to load with connection timeout.
CI — supabase gen types typescript fails with error code: 522. In the same deploy job, migrations push succeeded; only type generation failed.
Any one getting the same issues?
All reactions