Troubleshooting
Common issues and solutions.Container Issues
”Cannot connect to Docker daemon”
TaskDaemon needs access to the Docker socket to spawn handler containers. Solution: Mount the Docker socket:“Image not found” for handlers
Handler images must be available to the Docker daemon before TaskDaemon starts. Solution: Build handler images first:depends_on:
Handler container exits immediately
Handlers must keep running and read from stdin continuously. Solution: Ensure your handler loops:Task Issues
Tasks stuck in “pending”
Causes:- No workers running
- Handler type not configured
- Handler containers failing to start
Tasks failing immediately
Causes:- Handler returning invalid JSON
- Handler crashing
- Timeout too short
“Handler not found” error
The task type doesn’t match any configured handler. Solution: Checkhandlers.toml:
Performance Issues
High latency on first task
Container cold start takes ~500ms. Subsequent tasks use warm containers. Solution: Increaseinstances for frequently used handlers:
Queue growing faster than processing
Solutions:- Increase workers:
DAEMON_WORKERS=8 - Increase handler instances
- Optimize handler code
- Scale horizontally (multiple TaskDaemon instances)
Connection Issues
”Connection refused” on port 8080
TaskDaemon isn’t running or port isn’t exposed. Debug:gRPC connection fails
Causes:- Port 50051 not exposed
- Using wrong port
- TLS mismatch (TaskDaemon uses plaintext)
Database Issues
”Database is locked”
SQLite doesn’t handle high concurrency well. Solutions:- Reduce workers if running multiple instances
- Use a persistent volume for the database
- Consider using a different queue backend (future feature)
Tasks lost after restart
Database wasn’t persisted. Solution: Mount a volume:Getting Help
- Check logs:
docker logs taskdaemon - Enable debug logging:
DAEMON_LOG_LEVEL=debug - Open an issue on GitHub