Monitoring and Troubleshooting
Monitoring and Logging
Performance Monitoring
What this does: Shows real-time container resource usage
Why this matters: Helps monitor performance and resource consumption
Monitor Service Logs:
What this does: Shows aggregated logs from all Supabase services
Why this matters: Helps troubleshoot issues and monitor health
Performance Monitoring Commands
# Monitor resource usage
docker stats --no-stream
# Check disk usage
du -sh ~/projects/supabase-local/
# Monitor database performance
psql postgresql://postgres:postgres@localhost:54322/postgres -c "SELECT * FROM pg_stat_activity;"
Troubleshooting Guide
Supabase services fail to start
Symptoms: Error messages during supabase start Common Causes: Port conflicts, insufficient resources, Docker issues
Cannot access Supabase dashboard
Symptoms: Browser cannot reach http://localhost:54323 Solution: Check service status and firewall settings
Database connection refused
Symptoms: Cannot connect to PostgreSQL database Solution: Verify database service and credentials
Twingate connector not connecting
Symptoms: Connector shows offline in Twingate admin Solution: Check tokens and network connectivity
High memory usage
Symptoms: System running out of memory Solution: Optimize container resources
Slow API response times
Symptoms: API calls taking too long Solution: Check database performance and optimize queries
# Monitor database connections
psql postgresql://postgres:postgres@localhost:54322/postgres \
-c "SELECT count(*) FROM pg_stat_activity;"
# Check for slow queries
psql postgresql://postgres:postgres@localhost:54322/postgres \
-c "SELECT query, state, query_start FROM pg_stat_activity WHERE state = 'active';"
# Optimize database if needed
psql postgresql://postgres:postgres@localhost:54322/postgres \
-c "VACUUM ANALYZE;"