Troubleshooting
Common issues and solutions when working with Temporal-boost.
Table of Contents
- Connection Issues
- Worker Issues
- Activity Issues
- Workflow Issues
- Performance Issues
- Configuration Issues
- Deployment Issues
Connection Issues
Cannot Connect to Temporal Server
Symptoms: - Connection timeout errors - "Connection refused" errors - Worker fails to start
Solutions:
-
Verify Temporal server is running:
-
Check environment variables:
-
Verify network connectivity:
-
Check firewall rules:
- Ensure port 7233 is open
-
Check security group settings
-
For TLS connections:
TLS Handshake Errors
Symptoms: - SSL/TLS errors - Certificate validation failures
Solutions:
-
Verify TLS configuration:
-
For Temporal Cloud:
- Ensure
TEMPORAL_API_KEYis set -
Verify API key is valid
-
For self-hosted with TLS:
- Verify certificate configuration
- Check certificate expiration
Worker Issues
Worker Not Starting
Symptoms: - Worker fails to initialize - No tasks being processed
Solutions:
-
Check worker registration:
-
Verify worker configuration:
-
Check for reserved names:
- Don't use: "run", "cron", "exec", "all"
-
Use descriptive, unique names
-
Verify activities/workflows are defined:
Worker Not Processing Tasks
Symptoms: - Worker is running but no tasks processed - Tasks stuck in queue
Solutions:
-
Verify task queue name matches:
-
Check worker is connected:
- Look for connection logs
-
Verify Temporal server is accessible
-
Check task queue in Temporal UI:
- Verify tasks are in the queue
-
Check for pending tasks
-
Verify activity/workflow names:
Activity Issues
Activity Not Found
Symptoms: - "Activity not found" errors - Activity not executing
Solutions:
-
Verify activity name matches:
-
Check activity is registered:
-
Verify task queue matches:
- Activity must be in worker on same queue
Activity Timeout
Symptoms: - Activity timeout errors - "Activity timeout" messages
Solutions:
-
Increase timeout:
-
Check activity execution time:
- Log activity start/end times
-
Optimize slow operations
-
Use heartbeat for long-running activities:
Activity Retry Issues
Symptoms: - Activities retrying indefinitely - No retries happening
Solutions:
-
Configure retry policy:
-
Check error types:
- Temporal errors are retried
- Application errors may not be retried
Workflow Issues
Workflow Not Starting
Symptoms: - Workflow not executing - No workflow runs
Solutions:
-
Verify workflow is registered:
-
Check workflow name:
-
Verify client connection:
Workflow Determinism Errors
Symptoms: - "Non-deterministic workflow" errors - Workflow execution failures
Solutions:
-
Don't use random:
-
Don't use datetime.now():
-
Don't perform I/O:
Workflow Timeout
Symptoms: - Workflow execution timeout - Long-running workflows fail
Solutions:
-
Use continue-as-new for long workflows:
@workflow.defn(sandboxed=False, name="LongWorkflow") class LongWorkflow: @workflow.run async def run(self, data: list) -> None: for i, item in enumerate(data): if i > 0 and i % 100 == 0: await workflow.continue_as_new(data[i:]) await workflow.execute_activity( process_item, item, task_queue="queue", ) -
Split into multiple workflows:
- Break long workflows into smaller ones
- Use child workflows
Performance Issues
High Memory Usage
Symptoms: - Memory usage growing - Out of memory errors
Solutions:
-
Reduce concurrency:
-
Limit activity result size:
- Don't return large objects
-
Use external storage for large data
-
Monitor memory:
Slow Workflow Execution
Symptoms: - Workflows taking too long - Low throughput
Solutions:
-
Increase concurrency:
-
Use parallel activities:
-
Optimize activity execution:
- Reduce I/O operations
- Use connection pooling
-
Cache results when appropriate
-
Use sticky workflows:
Configuration Issues
Environment Variables Not Loading
Symptoms: - Configuration not applied - Using default values
Solutions:
-
Verify environment variables:
-
Load from .env file:
-
Check variable names:
- Use exact names:
TEMPORAL_TARGET_HOST -
Case-sensitive
-
Verify in code:
Prometheus Metrics Not Working
Symptoms: - Metrics endpoint not accessible - No metrics collected
Solutions:
-
Verify bind address:
-
Check port availability:
-
Verify endpoint:
-
Check runtime configuration:
Deployment Issues
Docker Container Issues
Symptoms: - Container not starting - Connection errors in container
Solutions:
-
Check network configuration:
-
Verify environment variables:
-
Check logs:
Kubernetes Deployment Issues
Symptoms: - Pods not starting - Connection errors
Solutions:
-
Verify service connectivity:
-
Check DNS resolution:
-
Verify secrets:
Debugging Tips
Enable Debug Mode
Or:
Enable Verbose Logging
Check Temporal UI
- Access Temporal UI at
http://localhost:8088 - View running workflows
- Check task queues
- Inspect workflow history
Common Log Patterns
# Log worker startup
logger.info(f"Worker {worker.name} starting")
# Log activity execution
logger.info(f"Executing activity: {activity_name}")
# Log workflow state
logger.info(f"Workflow state: {workflow_state}")
Getting Help
If issues persist:
- Check Temporal documentation
- Review Temporal Python SDK docs
- Check GitHub issues: temporal-boost issues
- Enable debug logging and review logs
- Check Temporal server logs