Operations
Monitoring
Cron Jobs as Health Indicator
The cron jobs table in the dashboard is the primary health indicator for the system. If cron jobs are running on schedule and showing no errors, the system is healthy. Key crons to watch:
| Cron Job | Healthy Interval | Alert If Stale By |
|---|---|---|
| ORACLE_PRICE_UPDATE | 5 min | 15 min |
| MINTING_TX_SYNC | 2 min | 10 min |
| CIRCULATION_SNAPSHOT | 24 hours | 48 hours |
| UNISWAP_AUTO_REBALANCE | 10 min | 30 min |
Common Cron Errors
| Error | Cron Job | Cause | Resolution |
|---|---|---|---|
timeout of 30000ms exceeded | ORACLE_PRICE_UPDATE | Belo API slow or down | Wait and retry; check Belo status |
timeout of 20000ms exceeded | ORACLE_PRICE_UPDATE | RPC node slow | Check RPC provider status |
TRANSFER_FROM_FAILED | UNISWAP_AUTO_REBALANCE | Insufficient token balance for mint | Check wallet balances; adjust maxBudget |
Calculated liquidity is zero | UNISWAP_AUTO_REBALANCE | Position entirely out of range | Adjust price band or trigger % |
BitGo API error | MINTING_TX_SYNC | BitGo Express unreachable | Check BitGo Express container |
nonce too low | Any TX-sending cron | Concurrent TX conflict | Usually self-resolves; check pending TXs |
Logs
Logs are sent to AWS CloudWatch via ECS container stdout/stderr.
Log Groups
/ecs/twin-backend-production-- Production backend logs/ecs/twin-backend-staging-- Staging backend logs
Useful Log Patterns
Code
Health Check Endpoints
| Endpoint | Method | Description | Expected Response |
|---|---|---|---|
/health | GET | Basic health check | 200 OK |
/api/health | GET | API health with DB connectivity | 200 OK + JSON |
Key Metrics
| Metric | Where to Check | Healthy Value |
|---|---|---|
| Oracle price freshness | Dashboard > Uniswap Pools cards | Updated < 10 min ago |
| Pool vs Oracle price deviation | Dashboard > Uniswap Pools cards | < 2% |
| Pending minting TXs | Dashboard > Minteo TX history | 0 (or resolving) |
| Cron job errors | Dashboard > Cron Jobs | None |
| ECS task count | AWS Console > ECS | Desired = Running |
| CloudFront error rate | AWS Console > CloudFront | < 1% |
Last modified on