3Troubleshooting

Common Issues

Trading Bot Not Trading

Symptoms: No trades appearing in history

Solutions:

  1. Check if background worker is running

  2. Verify MongoDB connection

  3. Check API logs for errors

  4. Ensure sufficient cash is available

  5. Verify market data is being fetched

Negative Cash Balance

Symptoms: Cash shows negative value

Solutions:

  1. Reset trading state using DELETE endpoint

  2. Check for bugs in trade execution logic

  3. Verify cash validation is working

  4. Review recent trades for errors

Dashboard Not Loading Data

Symptoms: Sections show "No data available"

Solutions:

  1. Check external API status

  2. Verify API rate limits aren't exceeded

  3. Check network connectivity

  4. Review browser console for errors

  5. Clear browser cache

Chat Not Responding

Symptoms: No response from Naoko

Solutions:

  1. Verify Anthropic API key is set

  2. Check API quota/limits

  3. Review API logs

  4. Test API key validity

  5. Check network connectivity

Database Connection Errors

Symptoms: 500 errors, data not persisting

Solutions:

  1. Verify MongoDB URI is correct

  2. Check network access settings

  3. Verify database user permissions

  4. Check connection pool limits

  5. Review MongoDB Atlas status

Performance Optimization

Slow Dashboard Loading

  1. Increase Cache TTL: Reduce API calls

  2. Optimize Queries: Use indexes

  3. Reduce Refresh Frequency: Adjust intervals

  4. Enable CDN Caching: Use Vercel Edge

High API Usage

  1. Increase Cache Duration: Reduce external calls

  2. Batch Requests: Combine API calls

  3. Use WebSockets: For real-time updates

  4. Implement Rate Limiting: Prevent abuse

Database Performance

  1. Add Indexes: On frequently queried fields

  2. Limit Query Results: Use pagination

  3. Optimize Aggregations: Use efficient queries

  4. Monitor Slow Queries: Identify bottlenecks


Last updated