Troubleshooting Guide¶
Common issues and solutions for FastAgentic deployments.
Diagnostic Commands¶
# Check application health
curl http://localhost:8000/health/ready
# View configuration
fastagentic config show
# Tail logs
fastagentic tail --level ERROR
# Inspect runs
fastagentic inspect --runs --status failed
# Check connectivity
fastagentic diagnose
Common Issues¶
Application Won't Start¶
Symptoms: - Container exits immediately - "Address already in use" error - Import errors
Diagnosis:
# Check logs
docker logs my-agent
# Verify port availability
lsof -i :8000
# Test imports
python -c "from fastagentic import App"
Solutions:
-
Port conflict:
-
Missing dependencies:
-
Configuration error:
Authentication Failures¶
Symptoms: - 401 Unauthorized responses - "Invalid token" errors - JWKS fetch failures
Diagnosis:
# Check OIDC configuration
echo $FASTAGENTIC_OIDC_ISSUER
# Verify JWKS endpoint
curl $FASTAGENTIC_OIDC_ISSUER/.well-known/openid-configuration
# Test token validation
curl -H "Authorization: Bearer $TOKEN" http://localhost:8000/health/ready
Solutions:
-
Wrong issuer:
-
Audience mismatch:
-
Clock skew:
-
Network issues reaching JWKS:
Durable Store Connection Failed¶
Symptoms: - "Connection refused" to Redis/Postgres - Checkpoints not saving - Runs fail to resume
Diagnosis:
# Test Redis
redis-cli -h $REDIS_HOST ping
# Test Postgres
psql $DATABASE_URL -c "SELECT 1"
# Check FastAgentic connection
fastagentic diagnose --store
Solutions:
-
Wrong connection string:
-
Network/firewall:
-
Authentication:
-
TLS required:
LLM Provider Errors¶
Symptoms: - 429 Rate limit errors - 401 Invalid API key - Timeout errors
Diagnosis:
# Check API key is set
echo $OPENAI_API_KEY | head -c 10
# Test API directly
curl https://api.openai.com/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY"
Solutions:
-
Invalid API key:
-
Rate limiting:
- Implement retry with backoff
- Add rate limits on your side
-
Request higher limits from provider
-
Timeouts:
High Latency¶
Symptoms: - P95 latency > 10s - Slow checkpoint writes - Streaming delays
Diagnosis:
# Check metrics
curl http://localhost:8000/metrics | grep duration
# Profile a request
fastagentic profile /chat --input '{"message":"test"}'
# Check store latency
fastagentic diagnose --store --latency
Solutions:
- Slow LLM responses:
- Use faster model (gpt-4o-mini vs gpt-4)
- Reduce max_tokens
-
Use streaming
-
Slow checkpoints:
- Use Redis instead of Postgres for hot path
- Reduce checkpoint frequency
-
Check store latency/network
-
High load:
- Scale horizontally
- Add rate limiting
- Check resource limits
Streaming Not Working¶
Symptoms: - SSE connection drops - No events received - Events arrive in batches
Diagnosis:
# Test SSE directly
curl -N http://localhost:8000/chat/stream \
-H "Accept: text/event-stream" \
-d '{"message":"test"}'
# Check proxy configuration
# Nginx/ALB may buffer SSE
Solutions:
- Proxy buffering:
-
Missing headers:
-
Timeout:
Out of Memory¶
Symptoms: - OOMKilled in Kubernetes - Container restarts - Slow performance before crash
Diagnosis:
# Check memory usage
kubectl top pods
# Check for memory leaks
fastagentic profile --memory
# Review checkpoint sizes
fastagentic inspect --checkpoints --size
Solutions:
-
Increase limits:
-
Reduce checkpoint retention:
-
Optimize adapter:
- Clear conversation history periodically
- Limit context window size
MCP Not Working¶
Symptoms: - /mcp/schema returns 404 - MCP clients can't connect - Tools not registered
Diagnosis:
# Check MCP is enabled
echo $FASTAGENTIC_MCP_ENABLED
# View MCP schema
curl http://localhost:8000/mcp/schema
# Check stdio transport
fastagentic run --stdio
Solutions:
-
MCP disabled:
-
Wrong path:
-
Schema not generated:
- Ensure decorators are properly applied
- Check for import errors
Health Check Failures¶
Liveness Probe Failing¶
# Check endpoint
curl http://localhost:8000/health/live
# Common causes:
# - Application crashed
# - Deadlock
# - Infinite loop
Readiness Probe Failing¶
# Check endpoint
curl http://localhost:8000/health/ready
# Common causes:
# - Database not connected
# - Dependent service down
# - Still initializing
Getting Help¶
- Check logs:
fastagentic tail --level DEBUG - Run diagnostics:
fastagentic diagnose - Search issues: GitHub Issues
- Community: Discord/Slack channel