CRE-2025-0132
Supabase Self-Hosted: Database Connection Timeout and Service FailureMediumImpact: 8/10Mitigation: 5/10
Description
Detects when Supabase services lose connection to the PostgreSQL database due to timeouts, network issues,\nor database unavailability. This affects Auth, REST API, Storage, and all database-dependent operations.\nOccurs during database restarts, network partitions, or when database becomes unresponsive.\n
Mitigation
IMMEDIATE:\n - Check database container status: `docker-compose ps db`\n - Restart database service: `docker-compose restart db`\n - Verify database connectivity: `docker-compose exec db pg_isready -U postgres`\nINVESTIGATION:\n - Check database logs: `docker-compose logs db`\n - Monitor connection pool: Check for connection limit errors\n - Verify network connectivity between containers\nPREVENTION:\n - Implement database health checks with proper timeouts\n - Configure connection pooling limits appropriately\n - Set up database monitoring and alerting\n - Use connection retry logic with exponential backoff\n