Troubleshooting Guide
Common issues and solutions for PulseGen installation, configuration, and operation.
Installation Issues
Docker Compose Fails to Start
Symptom: docker-compose up exits with errors
Solutions:
- Check Docker is running:
1
docker info
- Verify Docker Compose version:
1 2
docker-compose --version # Requires v2.0+
- Check port availability:
1 2 3 4
# Check if ports are in use lsof -i :3001 # Frontend lsof -i :5000 # Backend lsof -i :5432 # PostgreSQL
- View detailed logs:
1
docker-compose logs --tail=50
Permission Denied Errors
Symptom: Permission denied when running setup script
Solution:
1
2
chmod +x setup.sh
./setup.sh
Out of Disk Space
Symptom: Build fails with “no space left on device”
Solution:
1
2
3
4
5
# Clean up Docker resources
docker system prune -a --volumes
# Check available space
df -h
Database Issues
Connection Refused
Symptom: ECONNREFUSED or Connection refused to PostgreSQL
Solutions:
- Check PostgreSQL is running:
1 2
docker-compose ps postgres # Should show "healthy" - Verify DATABASE_URL format:
1
postgresql://USER:PASSWORD@HOST:PORT/DATABASE
- Test connection:
1
docker-compose exec postgres pg_isready - Check network connectivity:
1
docker-compose exec backend nc -zv postgres 5432
Migration Failures
Symptom: Prisma migrate fails
Solutions:
- Reset database (development only):
1
docker-compose exec backend npx prisma migrate reset --force
- Run migrations manually:
1
docker-compose exec backend npx prisma migrate deploy - Regenerate Prisma client:
1
docker-compose exec backend npx prisma generate
Database Already Exists
Symptom: “database already exists” error during setup
Solution: The setup script handles this. If persists:
1
2
# Use existing database
docker-compose exec postgres psql -U pulsegen -d pulsegen -c "SELECT 1"
Backend Issues
Backend Won’t Start
Symptom: Backend container keeps restarting
Solutions:
- Check logs:
1
docker-compose logs backend --tail=100
- Verify environment variables:
1
docker-compose exec backend printenv | grep -E "(DATABASE|JWT|ENCRYPTION)"
- Common missing variables:
JWT_SECRET- Must be at least 32 charactersJWT_REFRESH_SECRET- Must be at least 32 charactersENCRYPTION_KEY- Must be 64 hex characters
Invalid JWT Secret
Symptom: “JWT secret too short” or authentication failures
Solution: Generate proper secrets:
1
2
3
4
5
# Generate JWT secrets
openssl rand -base64 48
# Generate encryption key (64 hex chars)
openssl rand -hex 32
API Returns 500 Errors
Symptom: Internal server errors on API calls
Solutions:
- Check backend logs:
1
docker-compose logs backend --tail=50
- Verify database connection:
1
docker-compose exec backend npx prisma db pull - Check available memory:
1
docker stats pulsegen-backend
Rate Limiting Issues
Symptom: “Too many requests” errors
Solutions:
- Adjust rate limits in environment:
1 2
RATE_LIMIT_WINDOW_MS=900000 # 15 minutes RATE_LIMIT_MAX=1000 # Max requests per window
- For development, disable rate limiting:
1
RATE_LIMIT_ENABLED=false
Frontend Issues
Blank Page / White Screen
Symptom: Frontend loads but shows nothing
Solutions:
-
Check browser console for errors (F12 → Console)
- Verify API URL configuration:
1 2
# Check if API is reachable curl http://localhost:5000/api/health -
Clear browser cache and reload
- Check frontend logs:
1
docker-compose logs frontend
CORS Errors
Symptom: “Cross-Origin Request Blocked” in console
Solutions:
- Set CORS_ORIGIN in backend:
1
CORS_ORIGIN=http://localhost:3001
- For multiple origins:
1
CORS_ORIGIN=http://localhost:3001,https://yourdomain.com
- For development (not production):
1
CORS_ORIGIN=*
Assets Not Loading
Symptom: Images, CSS, or JS files return 404
Solutions:
- Check nginx configuration:
1
docker-compose exec frontend cat /etc/nginx/conf.d/default.conf
- Verify build completed:
1
docker-compose exec frontend ls -la /usr/share/nginx/html
Authentication Issues
Login Fails
Symptom: Can’t log in with correct credentials
Solutions:
- Check if user exists:
1 2
docker-compose exec backend npx prisma studio # Opens database GUI at http://localhost:5555
- Reset admin password:
1
docker-compose exec backend npm run db:seed - Verify JWT secrets match between restarts
Session Expires Immediately
Symptom: Logged out after refresh
Solutions:
- Check JWT expiration settings:
1 2
JWT_EXPIRES_IN=15m JWT_REFRESH_EXPIRES_IN=7d
-
Verify cookies are being set (check browser dev tools)
- Ensure HTTPS in production (secure cookies require HTTPS)
SSO Not Working
Symptom: Google/Microsoft/GitHub login fails
Solutions:
- Verify OAuth credentials are set:
1 2
GOOGLE_CLIENT_ID=your-client-id GOOGLE_CLIENT_SECRET=your-secret
-
Check redirect URIs in OAuth provider match your domain
- Verify callback URL:
1
https://yourdomain.com/api/auth/google/callback
AI Features Issues
AI Generation Fails
Symptom: “AI service unavailable” or generation errors
Solutions:
- Verify API key is set:
1
docker-compose exec backend printenv | grep API_KEY
- Test API key directly:
1 2 3
# For OpenAI curl https://api.openai.com/v1/models \ -H "Authorization: Bearer $OPENAI_API_KEY"
- Check API quota/billing on provider dashboard
Slow AI Responses
Symptom: AI features take very long
Solutions:
- Use faster models:
- OpenAI:
gpt-3.5-turboinstead ofgpt-4 - Anthropic:
claude-instantinstead ofclaude-2
- OpenAI:
-
Check network latency to AI provider
- Implement request timeouts:
1
AI_REQUEST_TIMEOUT=30000 # 30 seconds
Performance Issues
Slow Page Loads
Symptom: Application feels sluggish
Solutions:
- Enable Redis caching:
1
docker-compose --profile with-redis up -d
- Check database performance:
1
docker-compose exec postgres pg_stat_activity -
Add database indexes (check Prisma schema)
- Increase container resources:
1 2 3 4 5 6 7 8
# docker-compose.yml services: backend: deploy: resources: limits: memory: 1G cpus: '2'
High Memory Usage
Symptom: Containers using excessive memory
Solutions:
- Check memory usage:
1
docker stats
- Set memory limits:
1
docker-compose up -d --scale backend=1 --memory=512m
- Optimize Node.js memory:
1
NODE_OPTIONS="--max-old-space-size=512"
Network Issues
Container Can’t Reach Internet
Symptom: External API calls fail
Solutions:
- Check DNS resolution:
1
docker-compose exec backend nslookup google.com - Test connectivity:
1
docker-compose exec backend curl -I https://google.com
- Check Docker network:
1
docker network inspect pulsegen_default
Reverse Proxy Issues
Symptom: 502 Bad Gateway or connection refused behind proxy
Solutions:
- Enable trust proxy:
1
TRUST_PROXY=true
- Set correct headers in proxy:
1 2 3 4
proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;
- Increase proxy timeouts:
1 2
proxy_read_timeout 300; proxy_connect_timeout 300;
Upgrade Issues
Migration Fails After Upgrade
Symptom: Database migration errors after version update
Solutions:
- Backup first:
1
docker-compose exec postgres pg_dump -U pulsegen pulsegen > backup.sql
- Run migrations:
1
docker-compose exec backend npx prisma migrate deploy - If stuck, check migration status:
1
docker-compose exec backend npx prisma migrate status
Breaking Changes
Symptom: Features stop working after upgrade
Solutions:
-
Check changelog: CHANGELOG.md
-
Review migration guide for major versions
-
Rollback if needed:
1 2 3
docker-compose down docker-compose pull ghcr.io/genesis-nexus/pulsegen-backend:v1.x.x docker-compose up -d
Getting More Help
Collect Debug Information
Before asking for help, gather:
1
2
3
4
5
6
7
8
9
10
11
12
13
# System info
uname -a
docker --version
docker-compose --version
# Container status
docker-compose ps
# Recent logs
docker-compose logs --tail=200 > pulsegen-logs.txt
# Environment (redact secrets!)
docker-compose exec backend printenv | grep -v SECRET | grep -v KEY | grep -v PASSWORD
Where to Get Help
- Documentation: genesis-nexus.github.io/pulsegen
- GitHub Discussions: Ask questions
- GitHub Issues: Report bugs
- Security Issues: Use private vulnerability reporting
Common Log Patterns
| Log Message | Meaning | Solution |
|---|---|---|
ECONNREFUSED |
Can’t connect to service | Check if target service is running |
ENOTFOUND |
DNS resolution failed | Check network/hostname |
ETIMEDOUT |
Connection timed out | Check firewall/network |
ENOMEM |
Out of memory | Increase container memory |
ENOSPC |
Out of disk space | Clean up disk space |