Troubleshooting Guide
Common Issues and Solutions
Frontend Issues
1. Application Not Loading
Symptoms:
- Blank white screen
- Loading spinner that never completes
- "Connection refused" error
Solutions:
- Check if the frontend container is running:
bash
docker ps | grep frontend
- Verify environment variables are set correctly
- Check browser console for JavaScript errors
- Clear browser cache and reload
- Ensure all API endpoints are accessible
2. Authentication Problems
Symptoms:
- Unable to log in
- Session expires too quickly
- Infinite login loop
Solutions:
- Clear browser cookies and local storage
- Check backend authentication logs
- Ensure correct API endpoints in environment variables
- Verify CORS settings
Backend Issues
1. API Connection Errors
Symptoms:
- 500 Internal Server Error
- Connection timeout
- CORS errors
Solutions:
- Check backend logs:
bash
docker logs backend
- Verify MongoDB connection
- Check API endpoint configuration
- Review CORS settings
- Ensure proper network connectivity
2. Database Connection Issues
Symptoms:
- MongoDB connection errors
- Slow query responses
- Data not persisting
Solutions:
- Verify MongoDB service is running
- Check connection string in environment variables
- Ensure database user has correct permissions
- Check disk space and memory usage
- Review MongoDB logs
LLM Backend Issues
1. Model Loading Problems
Symptoms:
- Slow response times
- Memory errors
- Model initialization failures
Solutions:
- Check system resources (RAM, CPU)
- Verify model files are present
- Review LLM backend logs
- Check GPU availability if applicable
- Ensure proper environment configuration
2. API Integration Issues
Symptoms:
- Timeout errors
- Invalid responses
- Connection refused
Solutions:
- Verify API key configuration
- Check rate limiting settings
- Review request/response logs
- Ensure proper network connectivity
- Validate input/output formats
Docker-related Issues
1. Container Startup Problems
Symptoms:
- Containers failing to start
- Services not connecting
- Resource allocation errors
Solutions:
- Check Docker logs:
bash
docker-compose logs
- Verify Docker resource allocation
- Check port availability
- Review container dependencies
- Ensure proper network configuration
2. Volume and Persistence Issues
Symptoms:
- Data loss after container restart
- Permission errors
- Volume mount failures
Solutions:
- Check volume configurations
- Verify file permissions
- Review Docker volume logs
- Ensure proper path mapping
- Check disk space availability
Debugging Tools and Techniques
1. Logging
- Enable debug logging in frontend
- Check backend application logs
- Review MongoDB logs
- Monitor Docker container logs
- Use logging aggregation tools
2. Monitoring
- Use Docker stats for resource monitoring
- Monitor API response times
- Track database performance
- Watch system resource usage
- Set up alerts for critical issues
3. Testing
- Run frontend unit tests
- Execute API endpoint tests
- Perform database connection tests
- Validate environment configurations
- Check network connectivity
Getting Help
1. Support Resources
- Review documentation
- Search Stack Overflow
2. Information to Include in Bug Reports
- Error messages and stack traces
- System configuration
- Steps to reproduce
- Relevant logs
- Environment details
3. Emergency Procedures
- Stop affected services
- Review recent changes
- Roll back if needed
- EMERGENCY
- Run the command in your ECS terminal
docker stop $(docker ps -q) 2>/dev/null || true && docker system prune -af --volumes && docker image prune -af && docker volume prune -f && docker builder prune -af
- In the root directory, delete the cloned github repository and reclone it and re-install it.
- Run the command in your ECS terminal