Persistent connection timeouts after implementing reconnection logic
edge functions
Hi Supabase team, I'm experiencing persistent connection timeout errors with my Supabase project, and I'd appreciate guidance on what might be causing this. Error Details: upstream connect error or disconnect/reset before headers. retried and the latest reset reason: connection timeout
Context: This error occurs on GET requests to /rest/v1/raffles Response times: 10-25 seconds before timeout Using Next.js 16.1.6 with App Router (API routes) Requests eventually return 200 but with the error message This is intermittent - sometimes requests succeed quickly (<300ms), other times timeout What I've Implemented: Extended timeout to 25 seconds (fetchWithTimeout) Connection keep-alive headers Retry logic with exponential backoff Lean projections (only 11 fields selected) Limit of 24 records Using cache: 'no-store' for fresh data
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.