theCourseForum2
theCourseForum2 copied to clipboard
Random 500 Errors
DigitalOcean exhibits high CPU usage.
Steps to address:
- More CPUs! (just kidding, but kind of - need a safeguard anyway. One CPU for our entire application is not ideal. Luckily, deprecating elasticsearch perfectly covers the costs here).
- No more DigitalOcean (long term)
- Debugging the queries to see which take the most time (excessive fields being queried?)
I took a small crack at this last week and some of the api calls were just atrocious.
For example, the allstats flag on the courses route used distinct for everything which lead to a ~1 second mean response time when most other queries ran in <1 ms given the small size of our database.
Why are we migrating away from digital ocean?