Performance and scaling issues
Performance problems in Alquimia Platform usually show up as slow responses, growing queues, or high resource utilization. Because the platform separates request intake from execution, you can isolate the bottleneck quickly.
Common causes
Section titled “Common causes”| Symptom | Likely cause |
|---|---|
| Slow first response | Worker lag is high or LLM calls are slow. |
| Timeouts | Tool calls or LLM calls exceed configured limits. |
| High CPU on workers | Inference loop is tight or many agents run concurrently. |
| High memory use | Large context windows or many sessions in Redis. |
| Database pressure | Worklog write rate exceeds PostgreSQL capacity. |
Diagnostic steps
Section titled “Diagnostic steps”-
Check Kafka consumer lag to see if events are backing up.
-
Review worker resource metrics — CPU, memory, and goroutine or thread counts.
-
Look at LLM latency metrics to identify whether the model provider is the bottleneck.
-
Check Redis for lock contention, connection pool exhaustion, or memory growth.
-
Check PostgreSQL for slow queries, connection pool saturation, or write throughput.
-
Correlate with the worklog to find tasks with many tool calls or large context sizes.
- Add worker replicas when lag is growing.
- Reduce tool and LLM timeouts if they are too generous.
- Tune memory strategies to keep context windows bounded.
- Scale Redis and PostgreSQL independently if they are saturated.
- Move to faster LLM models or add caching for common queries.