Skip to main content

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:
Or in Docker Compose, use 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:
  1. No workers running
  2. Handler type not configured
  3. Handler containers failing to start
Debug:

Tasks failing immediately

Causes:
  1. Handler returning invalid JSON
  2. Handler crashing
  3. Timeout too short
Debug:

“Handler not found” error

The task type doesn’t match any configured handler. Solution: Check handlers.toml:

Performance Issues

High latency on first task

Container cold start takes ~500ms. Subsequent tasks use warm containers. Solution: Increase instances for frequently used handlers:

Queue growing faster than processing

Solutions:
  1. Increase workers: DAEMON_WORKERS=8
  2. Increase handler instances
  3. Optimize handler code
  4. 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:
  1. Port 50051 not exposed
  2. Using wrong port
  3. TLS mismatch (TaskDaemon uses plaintext)
Solution:

Database Issues

”Database is locked”

SQLite doesn’t handle high concurrency well. Solutions:
  1. Reduce workers if running multiple instances
  2. Use a persistent volume for the database
  3. Consider using a different queue backend (future feature)

Tasks lost after restart

Database wasn’t persisted. Solution: Mount a volume:

Getting Help

  1. Check logs: docker logs taskdaemon
  2. Enable debug logging: DAEMON_LOG_LEVEL=debug
  3. Open an issue on GitHub