Common issues and solutions for RouteMQ applications.
- Common Issues - Frequently encountered problems
- Connection Problems - MQTT and database connectivity
- Performance Issues - Optimization and debugging
- Redis Issues - Redis-specific problems
- Debug Mode - Enabling detailed logging
Problem: Routes defined in router files are not being discovered
Solutions:
- Check that router files have a
routervariable - Ensure router files are in the correct directory (
app/routers/) - Verify router files have proper Python syntax
- Check logs for import errors
Problem: Shared subscription workers are not starting
Solutions:
- Ensure shared routes are properly configured with
shared=True - Check worker_count parameter is set correctly
- Verify MQTT broker supports shared subscriptions
- Check for port conflicts or permission issues
Problem: Cannot connect to MySQL database
Solutions:
- Verify database credentials in
.envfile - Check network connectivity to database server
- Ensure database exists and user has proper permissions
- Check database server is running
Problem: Cannot connect to MQTT broker
Solutions:
- Check broker address, port, and credentials
- Verify MQTT broker is running and accessible
- Check firewall settings
- Test connection with MQTT client tools
Problem: Cannot connect to Redis server
Solutions:
- Verify Redis server is running
- Check Redis credentials and configuration
- Test Redis connection with
redis-cli - Verify network connectivity
Problem: Rate limiting middleware not blocking requests
Solutions:
- Ensure Redis is enabled or fallback mode is configured
- Check rate limiting configuration parameters
- Verify middleware is properly applied to routes
- Check Redis key expiration settings
Enable debug logging for detailed troubleshooting:
LOG_LEVEL=DEBUGThis provides detailed information about:
- Route discovery and loading process
- Message processing and middleware execution
- Worker process management
- Redis operations and connection status
- Rate limiting decisions and calculations
- Check the logs for error messages
- Enable debug mode for detailed information
- Verify configuration settings
- Test individual components in isolation
- Check the FAQ for common questions
- Common Issues - Detailed problem solutions
- Performance Issues - Optimization tips
- Debug Mode - Advanced debugging techniques