Symptoms:
- Containers fail to start
- Services not responding
- Port conflicts
Solutions:
# Check Docker status
docker ps -a
# Check logs
./logs.sh
# Restart services
./restart.sh
# Check port conflicts
netstat -tulpn | grep -E "(8001|8002|8003|8004|8005)"Symptoms:
- Database connection timeouts
- Migration failures
- Service startup failures
Solutions:
# Check PostgreSQL status
docker exec -it be-yourmoments-dev_postgres_1 pg_isready
# Check database logs
docker logs be-yourmoments-dev_postgres_1
# Restart database
docker restart be-yourmoments-dev_postgres_1Symptoms:
- Services cannot find each other
- Consul registration failures
Solutions:
# Check Consul status
curl http://localhost:8500/v1/status/leader
# Check service registration
curl http://localhost:8500/v1/catalog/services
# Restart Consul
docker restart be-yourmoments-dev_consul_1Symptoms:
- High memory usage
- Slow performance
- Container evictions
Solutions:
# Check resource usage
./scripts/monitor-dev.sh resources
# Check Docker stats
docker stats
# Clean up unused resources
docker system prune -f# Check overall status
./scripts/monitor-dev.sh status
# Check specific service
./scripts/monitor-dev.sh logs photo-svc
# Follow logs
./scripts/monitor-dev.sh follow user-svc
# Check health
./scripts/monitor-dev.sh health# Show all containers
docker ps -a
# Show container logs
docker logs <container_name>
# Execute command in container
docker exec -it <container_name> bash
# Show container details
docker inspect <container_name># Show networks
docker network ls
# Show network details
docker network inspect backend
# Test connectivity
docker exec -it <container_name> ping <other_container># Show volumes
docker volume ls
# Show volume details
docker volume inspect <volume_name>
# Check disk usage
docker system df# Check memory usage
./scripts/monitor-dev.sh resources
# Check specific container
docker stats <container_name>
# Restart high-memory containers
docker restart <container_name># Check service response times
curl -w "@curl-format.txt" -o /dev/null -s http://localhost:8001/health
# Check database performance
docker exec -it be-yourmoments-dev_postgres_1 psql -U postgres -c "SELECT * FROM pg_stat_activity;"# Check CPU usage
docker stats --no-stream
# Check specific container CPU
docker exec -it <container_name> top# Restart specific service
./scripts/monitor-dev.sh restart photo-svc
# Restart all services
./restart.sh
# Check service status
./status.sh# Restart database
docker restart be-yourmoments-dev_postgres_1
# Check database status
docker exec -it be-yourmoments-dev_postgres_1 pg_isready
# Run migrations
docker exec -it be-yourmoments-dev_photo-svc_1 ./migrate up# Stop all services
./stop.sh
# Clean up resources
docker system prune -f
# Restart services
./start.sh
# Check status
./status.shFor additional support:
- Check the logs first
- Review the monitoring dashboard
- Consult the documentation
- Contact the development team