General Troubleshooting Steps
Before diving into specific issues, try these general steps:Container Issues
Containers fail to start
Containers fail to start
Symptoms:Ensure at least 2GB RAM is available.
docker-compose upexits with errors- Containers show “Exited” status
- Check Docker logs:
- Verify Docker has sufficient resources:
- Check for port conflicts:
- Rebuild images from scratch:
Application container restarts repeatedly
Application container restarts repeatedly
Symptoms:
- Container shows “Restarting” status
- Health check fails continuously
- Check the entrypoint script execution:
- Verify database initialization (docker/entrypoint.sh:8):
- Check migration failures:
- Verify APP_KEY is set:
- Check disk space:
Queue worker stops processing jobs
Queue worker stops processing jobs
Symptoms:If memory usage approaches 2GB, the worker restarts automatically.
- Downloads stuck in pending state
- Queue container running but idle
- Restart queue workers (docker/entrypoint.sh:26):
- Check for failed jobs:
- Retry failed jobs:
- Monitor queue in real-time:
- Check memory limits (docker/Dockerfile:105):
Database Issues
Database file permission errors
Database file permission errors
Symptoms:
- “Permission denied” errors in logs
- “Unable to open database file” errors
- Fix permissions on host:
- Ensure directory exists before container start:
- Check container user (should be www-data):
- Recreate with correct permissions:
Migration failures
Migration failures
Symptoms:
- Container starts but migrations fail
- “Table already exists” errors
- Check migration status:
- Rollback and re-migrate:
- Fresh migration (DESTRUCTIVE - deletes all data):
- Check database connection:
Database locked errors
Database locked errors
Symptoms:
- “Database is locked” errors
- Timeouts during high concurrency
- Enable WAL mode (better concurrency):
- Increase busy timeout:
- Consider migrating to PostgreSQL/MySQL for high-traffic deployments.
External Service Integration
Cannot connect to Aria2 RPC
Cannot connect to Aria2 RPC
Symptoms:
- Downloads fail immediately
- “Connection refused” to Aria2
- Verify Aria2 is running on host:
- Check host.docker.internal resolution:
- Update ARIA2_RPC_HOST in .env or docker-compose.yml:
- For Linux, add extra_hosts to docker-compose.yml:
- Test connection from container:
Meilisearch connection issues
Meilisearch connection issues
Symptoms:
- Search not working
- “Connection refused” to Meilisearch
- Index sync failures
- Verify Meilisearch is running:
- Check MEILISEARCH_HOST configuration (docker-compose.yml:13):
- Sync indexes manually (docker/entrypoint.sh:52):
- Re-index all data:
- Verify master key if authentication is enabled:
Performance Issues
Slow response times
Slow response times
Symptoms:
- Pages take >1 second to load
- Timeouts under moderate load
- Verify caches are active (docker/entrypoint.sh:38-41):
- Rebuild caches:
- Check OPcache status:
- Monitor PHP-FPM/FrankenPHP workers:
- Increase worker count if needed (edit docker/Dockerfile:112):
High memory usage
High memory usage
Symptoms:
- Containers using >1GB RAM
- Out of memory errors
- Check current memory usage:
- Review PHP memory limit (docker/Dockerfile:43):
- Optimize queue worker memory (docker/Dockerfile:105):
- Clear application cache:
- Check for memory leaks in jobs:
Download jobs timeout
Download jobs timeout
Symptoms:
- Large downloads fail mid-stream
- “Maximum execution time exceeded”
- Queue worker already has unlimited timeout (docker/Dockerfile:105):
- Increase PHP max_execution_time if needed (docker/Dockerfile:41):
- Check Aria2 configuration:
- Monitor job progress:
Build Issues
Frontend build fails
Frontend build fails
Symptoms:
- Docker build fails during frontend stage
- Vite errors in build logs
- Check Node/Bun version (docker/Dockerfile:3):
- Clear Bun cache and rebuild:
- Verify package.json and bun.lock exist:
- Build frontend locally to debug:
- Check for missing environment variables (docker/Dockerfile:9-11):
Composer dependencies fail to install
Composer dependencies fail to install
Symptoms:Ensure composer.json requires compatible PHP version.
- Build fails during composer install
- Missing PHP extensions
- Verify PHP version (docker/Dockerfile:16):
- Check required extensions (docker/Dockerfile:19-35):
- Clear Composer cache:
- Check composer.json syntax:
HTTPS/TLS Issues
HTTPS not working
HTTPS not working
Symptoms:
- Cannot access site via HTTPS
- Certificate errors
- Verify HTTPS ports are exposed (docker-compose.yml:46-47):
- Check Caddyfile configuration (docker/Caddyfile):
- Ensure domain resolves to server:
- Check Caddy logs:
- Verify ports 80 and 443 are open:
Let's Encrypt certificate failures
Let's Encrypt certificate failures
Symptoms:
- “Failed to obtain certificate” errors
- ACME challenge failures
- Ensure port 80 is accessible (required for HTTP challenge):
- Check DNS records:
- Review Caddy’s ACME directory:
- Use staging certificates for testing:
Storage and Volumes
Storage link broken
Storage link broken
Symptoms:
- Uploaded files return 404
/storage/URLs don’t work
- Recreate storage link (docker/entrypoint.sh:46):
- Verify link exists:
- Check storage directory permissions:
Volume data lost after restart
Volume data lost after restart
Symptoms:
- Database resets after container restart
- Uploads disappear
- Verify named volumes exist (docker-compose.yml:62-64):
- Check volume mounts:
- Don’t use
docker-compose down -vunless intentional:
- Backup volumes before operations:
Getting Additional Help
If you continue to experience issues:- Enable debug mode temporarily:
- Collect diagnostic information:
- Check Laravel logs:
-
Review system requirements:
- Docker Engine 20.10+
- Docker Compose v2.0+
- Minimum 2GB RAM
- Sufficient disk space for downloads
-
Consult documentation:
- Docker Deployment
- Production Deployment
- Laravel documentation at laravel.com
-
Report issues:
- GitHub: https://github.com/shekohex/lionz/issues
- Include logs and system information