So you thought your database is in good shape, but suddenly your CPU usage spiked and reached 100% at 2AM. How would you go about tracking the root cause and fix it?
1. Locate the root cause
If you are using CloudWatch or any infrastructure monitoring
solution, you can start your investigation there.
To understand what happened in your database, you should enable
the slow query log feature on your database. This will capture
all the slow log queries into a log, based on a threshold that
you define.
If you need, we created a step-by-step guide on how to enable the slow query log.
Once you enabled it, you can use slowquerylog.com to …
[Read more]