Troubleshooting
Solutions for common issues with self-hosted Synjar.
Application won't start
Port already in use
Error: EADDRINUSE: address already in use
Solution:
# Find what's using the port
lsof -i :6200
# Kill the process or change port
export PORT=6201
Database connection failed
Error: Connection refused or timeout
Solution:
- Verify PostgreSQL is running:
docker-compose ps postgres - Check connection string in
.env - Verify network connectivity:
docker-compose exec synjar nc -zv postgres 5432
Missing environment variables
Error: Required environment variable not set
Solution:
- Check
.envfile exists - Verify required variables are set
- Restart after changes:
docker-compose down && docker-compose up -d
Document processing issues
Documents stuck in "Processing"
Possible causes:
- OpenAI API issues
- Storage connection problems
- Worker crashed
Solutions:
- Check OpenAI API key:
curl https://api.openai.com/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY" - Verify storage connection
- Check logs for errors:
docker-compose logs synjar | grep -i error
Processing fails immediately
Check:
- File format supported (PDF, DOCX, TXT, MD)
- File not corrupted
- File not password protected
- File contains text (not scanned images)
Search not returning results
No results found
- Document not ready: Wait for processing to complete
- Wrong workspace: Verify searching correct workspace
- Index issue: Re-upload document to re-index
Incorrect results
- Be more specific: Add context to query
- Check document content: Verify expected text exists
- Embedding issue: Re-process document
Performance issues
Slow response times
Check:
- Database performance:
SELECT * FROM pg_stat_activity; - Resource usage:
docker stats - Network latency to services
High memory usage
Solutions:
- Increase container memory limit
- Reduce concurrent connections
- Check for memory leaks in logs
Slow database queries
# Enable slow query log
docker-compose exec postgres psql -U synjar -c \
"ALTER SYSTEM SET log_min_duration_statement = 1000;"
Storage issues
Upload fails
Check:
- Storage credentials correct
- Bucket exists
- CORS configured (for web uploads)
- File size within limits
Files not accessible
Check:
- Bucket permissions
- Endpoint URL correct
- Network connectivity
Email issues
Emails not sending
- Verify SMTP settings:
# Test SMTP connection
nc -zv smtp.yourprovider.com 587 - Check credentials
- Verify FROM address is allowed
Emails going to spam
- Configure SPF record
- Set up DKIM
- Use verified sending domain
Database issues
Migration failed
# Check migration status
docker-compose exec synjar npx prisma migrate status
# Reset if needed (DELETES DATA!)
docker-compose exec synjar npx prisma migrate reset
Disk space full
# Check disk usage
docker system df
# Clean up
docker system prune -a
Getting help
If these solutions don't help:
- Check GitHub Issues
- Search existing discussions
- Create new issue with:
- Error message
- Logs
- Environment details
- Steps to reproduce