with one click
with one click
Guide for investigating slow PostgreSQL queries
AWS Lambda High Latency Troubleshooting
Troubleshooting Application Gateway Problems
Python Application Memory Troubleshooting
Service Connectivity Issues
Use this skill when the user asks to "patch a CVE", "fix a CVE", "handle a CVE", "check a CVE", or discusses Docker image vulnerabilities, docker scout findings, or Go/dependency CVE remediation in the Dockerfile.
| name | database-troubleshooting |
| description | Database Connection Troubleshooting |
This runbook helps diagnose database connection timeout issues in Kubernetes applications.
Verify the application pods are running and review recent events:
kubectl get pods -n {namespace} -l app={app_name}
kubectl describe pod -n {namespace} -l app={app_name}
Look for connection errors and timeout patterns:
kubectl logs -n {namespace} -l app={app_name} --tail=50 | grep -E "(timeout|connection|ERROR)"
Check if the database service exists and has endpoints:
kubectl get svc -n {namespace} | grep -E "(postgres|mysql|database)"
kubectl get endpoints -n {namespace} | grep -E "(postgres|mysql|database)"
Test connectivity from application pod to database:
kubectl exec -n {namespace} $(kubectl get pod -n {namespace} -l app={app_name} -o jsonpath="{.items[0].metadata.name}") -- nc -zv {db_host} {db_port}
Connect to database and check its status:
# For PostgreSQL
kubectl exec -n {namespace} {db_pod} -- psql -U postgres -c "SELECT 1"
# Check active connections
kubectl exec -n {namespace} {db_pod} -- psql -U postgres -c "SELECT count(*) FROM pg_stat_activity"
Check application's database connection pool settings:
kubectl get deployment -n {namespace} {app_name} -o yaml | grep -A10 "env:"