Overview
This guide covers common issues encountered when deploying Junkie and how to resolve them.Docker Issues
Build Fails with Git Dependency Error
Error:discord.py-self package is installed from GitHub and requires git.
Solution: The Dockerfile already includes git installation. If you still see this error:
Dockerfile:8-10):
Container Exits Immediately
Symptoms: Container starts then stops within seconds. Debug steps:-
Check logs:
-
Run interactively:
-
Common causes:
- Missing environment variables
- Invalid database connection
- Missing API keys
- Python import errors
uv Installation Fails
Error:Environment Variable Issues
Variables Not Loading
Symptoms: Application behaves as if environment variables aren’t set. Debug steps:-
Verify .env file location:
-
Check file syntax:
-
Test loading:
-
Docker: Pass via —env-file:
Missing Required Variables
Error:core/config.py):
Database Connection Issues
Connection Refused
Error:-
Verify connection string format:
-
Test connection:
-
Check network access:
-
Common issues:
- Database not running
- Firewall blocking port 5432
- Incorrect host/port
- Database not accepting external connections
Authentication Failed
Error:-
Verify credentials:
-
Test manually:
-
Check user permissions:
SSL Required
Error:?sslmode=require to connection string:
API Key Issues
Invalid API Key
Error:-
Check key format:
-
Verify key is active:
- Check provider dashboard
- Ensure key hasn’t been revoked
- Check usage limits
-
Test API call:
Rate Limit Exceeded
Error:-
Reduce agent retries:
-
Reduce max concurrent agents:
- Upgrade API plan or wait for rate limit reset
Provider Not Found
Error:CUSTOM_PROVIDER value (core/config.py:10):
Phoenix Tracing Issues
Tracing Not Working
Symptoms: No traces appear in Phoenix dashboard. Debug steps:-
Check if tracing is enabled:
-
Verify API key:
-
Check logs for initialization:
-
Common issues:
TRACING=falseor not set- Missing
PHOENIX_API_KEY arize-phoenixpackage missing fromrequirements.txt- Network issues
core/observability.py:7-55
Phoenix Import Error
Error:requirements.txt includes (requirements.txt:3-7):
Phoenix High Overhead
Symptoms: Application is slow with tracing enabled. Solutions:-
Ensure batching is enabled (
core/observability.py:38): -
Sample traces:
-
Disable in development:
Railway Deployment Issues
Build Fails on Railway
Debug steps:-
Check build logs:
- Go to “Deployments” tab
- Click failed deployment
- Review build output
-
Common causes:
- Missing dependencies in
requirements.txt - Invalid Dockerfile syntax
- Out of memory during build
- Missing dependencies in
Service Won’t Start
Debug steps:-
Check runtime logs:
- Go to “Logs” tab
- Look for error messages
-
Verify environment variables:
- Go to “Variables” tab
- Ensure all required vars are set
-
Test locally with same environment:
Database Connection Fails on Railway
Issue: Railway’s internal PostgreSQL uses private networking. Solution: Use Railway’s providedDATABASE_URL:
- Click on PostgreSQL service
- Copy “Database URL”
- Set as
POSTGRES_URLin your service variables
Performance Issues
High Memory Usage
Debug:-
Reduce max agents:
-
Disable debug mode:
-
Reduce context limits:
Slow Response Times
Debug steps:- Check Phoenix traces for bottlenecks
- Profile database queries
- Monitor API latencies
-
Reduce temperature (faster but less creative):
-
Use faster model:
-
Optimize agent retries:
Debugging Tips
Enable Debug Mode
Check Application Logs
Test Components Individually
Use Interactive Container
Getting Help
If you’re still stuck:- Check logs with
DEBUG_MODE=true - Review configuration in
core/config.py - Test dependencies are installed correctly
- Verify environment variables are loaded
- Check network connectivity to external services
Common Error Messages
ModuleNotFoundError
Error:ImportError: discord.py-self
Error:Dockerfile:8-10).
OSError: [Errno 28] No space left on device
Solution: Clean up Docker:Next Steps
- Environment Setup - Review configuration
- Monitoring - Set up observability
- Docker Deployment - Review Docker setup