Most ChatAgents failures fall into one of five categories: container networking problems (the frontend cannot reach the backend), Nginx misconfiguration (wrongDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/EllisYuan/ChatAgents/llms.txt
Use this file to discover all available pages before exploring further.
proxy_pass or missing WebSocket upgrade headers), API key or quota issues, session data loss from a missing volume mount, and performance bottlenecks from using a large model or too many crawl pages. Start by checking the log commands at the bottom of this page to identify which layer is producing errors, then jump to the relevant accordion below.
Docker issues
Frontend shows '❌ Backend service not running'
Frontend shows '❌ Backend service not running'
Symptom: The Streamlit UI renders but displays a banner indicating the backend is not reachable. Chat input is disabled.Common causes:Fix:In Recovery:
BACKEND_URLis set tohttp://localhost:8080instead of the Docker service name- The
chatbot-backendcontainer is not running or has not yet passed its health check - Both containers are not on the same Docker network
docker-compose.yml, verify:BACKEND_URLuses the service namebackend, notlocalhostor127.0.0.1- Both
backendandfrontendservices are in the samechatbot-network - The
backendservice has ahealthcheckandfrontendhasdepends_on: backend: condition: service_healthy
Nginx 404 Not Found on /api/ routes
Nginx 404 Not Found on /api/ routes
Symptom: Accessing Correct config:After editing:Verification:
https://your-domain.com/api/sessions (or any /api/ path) returns 404 Not Found from Nginx, even though curl http://localhost:8080/api/sessions works directly.Cause: A trailing slash on proxy_pass tells Nginx to strip the matched prefix (/api/) before forwarding. FastAPI never sees /api/sessions — it receives /sessions, which does not exist.Wrong config:Streamlit page keeps loading / WebSocket error
Streamlit page keeps loading / WebSocket error
Symptom: The browser shows a spinning loader indefinitely, or the browser console shows a WebSocket connection error on After adding or correcting the block, reload Nginx:Then hard-refresh the browser (
wss://your-domain.com/_stcore/stream.Cause: Nginx is missing the WebSocket upgrade headers for Streamlit’s /_stcore/stream endpoint. Without them Nginx cannot pass the protocol upgrade handshake through to the Streamlit container.Fix: Ensure the following location block is present in your Nginx config:Ctrl+Shift+R / Cmd+Shift+R) to force a new WebSocket connection attempt.Local development issues
Backend port already in use
Backend port already in use
Symptom: Running Fix — kill the occupying process:Fix — change the port:Edit If running in Docker, also update
python app.py fails with OSError: [Errno 98] Address already in use or ConnectionRefusedError.Diagnosis:.env and set a different port, then restart:BACKEND_PORT in .env and the proxy_pass port numbers in your Nginx config.API key authentication error (401)
API key authentication error (401)
Symptom: The chat interface returns
Double-check that the key has not been truncated and that there are no leading/trailing spaces in The command should print your key, not If these return empty, check that the keys are defined in
401 Unauthorized or “API key validation failed” after sending a message.Key format checks:| Provider | Expected prefix |
|---|---|
| Anthropic Claude | sk-ant-api-... |
| Tavily | tvly-... |
| OpenAI | sk-proj-... |
.env.Test that .env is loading correctly:None.Docker — verify env vars are passed into the container:.env and that docker-compose.yml maps them:Runtime issues
Tool call timeout or Tavily error
Tool call timeout or Tavily error
Symptom: The agent starts a search or extract tool call but it times out or returns an error. The streaming response may show a tool error message or stop unexpectedly.Diagnosis:Common causes and fixes:
- Network / firewall: Tavily’s API is an external service. Check that outbound HTTPS traffic from the server is not blocked by a firewall or corporate proxy.
- Tavily API quota exhausted: Log in to app.tavily.com and check your usage. The free tier has monthly request limits.
- Too many crawl pages: Deep Thinking mode crawls up to 15 pages per query. Reduce
crawl_limitor switch to Fast Mode (5-page limit) to stay within quota. - Rate limiting: Reduce the number of concurrent requests or add a delay between queries.
Streaming response stops mid-reply
Streaming response stops mid-reply
Symptom: The assistant’s response begins streaming but cuts off before completing, sometimes mid-sentence.Common causes and fixes:
- LLM API rate limits or quota: Check your Anthropic / OpenAI dashboard for rate limit errors. The backend logs will show
429 Too Many Requestsif this is the case. - Nginx proxy timeout: If you are using Nginx, the default
proxy_read_timeout(60 s) may expire before the agent finishes. Increase it in the/stream_agentlocation block:Then reload:sudo nginx -t && sudo systemctl reload nginx - Model too large for quota tier: Switch to a lighter model. Claude Haiku is significantly faster and cheaper than Sonnet or Opus and is sufficient for most queries.
Data issues
Session history lost after container restart
Session history lost after container restart
Symptom: After running After adding the volume, restart:Emergency data recovery (if the container is still running):
docker-compose down && docker-compose up -d, all previous conversations are gone from the sidebar.Cause: The data/ directory was not mounted from the host into the container. When the container was removed, its filesystem layer (including data/sessions/) was discarded.Fix: Ensure docker-compose.yml includes the volume mount on the backend service:Performance issues
Slow responses
Slow responses
Symptom: Queries take a long time to complete, especially in Deep Thinking mode.Optimisation checklist:Look for CPU % consistently near 100% or memory usage approaching the container limit. If so, consider upgrading the server or reducing concurrent users.
- Use a faster model — Claude Haiku is the fastest and most cost-effective option; Opus is the slowest. Switch in the sidebar model selector.
- Use Fast Mode — reduces search results from 5 to 3 and crawl pages from 15 to 5, cutting tool call overhead significantly.
- Reduce
max_resultsand crawl limit — in Fast Mode these are already lower; avoid Deep Thinking mode for simple factual questions. - Check server resources — if the host is CPU- or memory-constrained, the containers will be throttled: