Troubleshooting
Debug and troubleshoot Redis connectivity and caching issues in BoxLang applications with step-by-step guidance.
When encountering issues with Redis connectivity or caching, follow these debugging steps to identify and resolve problems.
π BoxLang Application Logs
Start by checking your BoxLang application logs for Redis-related errors:
Location: Depends on your runtime environment
CommandBox: Check
{server-home}/logs/directoryTomcat/Jetty: Check application server logs directory
Docker: Use
docker logs <container-name>
Look for:
Connection timeout errors
Authentication failures
Pool exhaustion warnings
Serialization/deserialization errors
Cache key conflicts
Example error patterns:
redis.clients.jedis.exceptions.JedisConnectionException
Connection timed out
Could not get a resource from the pool
NOAUTH Authentication requiredπ» BoxLang Console Output
Enable debug output in your BoxLang runtime to see real-time cache operations by starting the server in debug mode. See the Configuration section for details.
Console logging:
π΄ Redis Server Logs
Redis logs provide detailed information about server-side operations and errors.
Log locations by installation method:
Linux (systemd):
/var/log/redis/redis-server.logMacOS (Homebrew):
/usr/local/var/log/redis.logDocker:
docker logs <redis-container-name>Windows: Check your Redis installation directory
Access logs:
Common log indicators:
# Server started- Successful startup# Connection from {ip}- Client connections# Client closed connection- Disconnections# Warning: memory usage high- Memory issuesNOAUTH- Authentication failuresREADONLY- Cluster failover states
π οΈ Redis CLI Tools
Use the Redis command-line interface to test connectivity and inspect data:
Connect to Redis:
Useful diagnostic commands:
π₯οΈ Redis Web Administration Tools
Several web-based tools can help visualize and debug Redis data:
Redis Commander
Open-source web management tool for Redis.
Installation:
Access: http://localhost:8081
Features:
Browse keys by pattern
View key values and TTLs
Delete keys
Monitor server stats
Real-time key search
RedisInsight
Official Redis GUI by Redis Ltd (free).
Download: https://redis.com/redis-enterprise/redis-insight/
Features:
Visual key browser
Real-time performance monitoring
Memory analysis
Cluster topology view
Command profiler
Built-in CLI
P3X Redis UI
Electron-based desktop app for Redis management.
Download: https://github.com/patrikx3/redis-ui
Features:
Cross-platform desktop app
Multiple connection management
Tree view of keys
JSON/String/Binary viewers
π Common Issues & Solutions
Connection Timeouts
Symptoms: Connection timeout errors in logs
Solutions:
Verify Redis server is running:
systemctl status redis(Linux)Check network connectivity:
telnet redis-host 6379Review firewall rules
Increase
timeoutsetting in BoxLang configurationCheck Redis
maxclientssetting
Authentication Failures
Symptoms: NOAUTH Authentication required errors
Solutions:
Verify
passwordsetting matches Redis configurationCheck Redis ACL permissions:
ACL LISTin redis-cliEnsure
usernameis correct (if using ACL)Test authentication:
redis-cli -a yourpassword PING
Pool Exhaustion
Symptoms: Could not get a resource from the pool errors
Solutions:
Increase
maxConnectionssettingCheck for connection leaks in application code
Reduce
poolWaittimeoutto fail fasterMonitor active connections:
CLIENT LISTin redis-cliReview connection usage patterns
Cache Misses
Symptoms: High cache miss ratio, poor performance
Solutions:
Verify keys are being stored: Use
KEYSorSCANin redis-cliCheck
keyprefixconfiguration matchesReview
cacheKeyCaseSensitivitysettingVerify TTL values:
TTL keynamein redis-cliCheck Redis memory limits:
INFO memory
Cluster Connection Issues
Symptoms: MOVED or ASK redirection errors
Solutions:
Verify all cluster nodes are healthy:
CLUSTER INFOCheck cluster topology:
CLUSTER NODESEnsure
hostsincludes multiple nodes for failoverIncrease
maxAttemptsfor retriesReview cluster slot assignments
π Debug Logging Configuration
Enable detailed logging in your BoxLang application:
View cache statistics:
π§ Testing Connectivity
Create a simple test script to verify Redis connectivity:
π Getting Help
If you continue to experience issues:
Check BoxLang documentation: https://boxlang.io/docs
Redis documentation: https://redis.io/docs
Community support: BoxLang Slack/Discord channels
Professional support: Contact Ortus Solutions for BoxLang+ support
Last updated
Was this helpful?
