We deployed an update of our software today (3 EC2 instances) and made a migration to our RDS (db.t2.medium, Postgres) which added one column to a table with ~15 rows. Before migrating, we had a CPU usage of around "2". After the migration the CPU usage increased to "60". After a db reboot, it dropped, but went up again.
As a sidenote: After migration we tried to connect using a GUI and it hanged while SSL-verification. We restartet the GUI and it worked again.
Any advice on this? Here is a screenshot with current metrics. You can clearly see the increase in usage.
We currently use PostgreSQL 9.6.2!
We fixed this ourselves:
The problem was, we didn't shut down our background service, which made several transactions while updating our software and the db. These transactions polluted the database. We found these transactions using this snippet:
After flushing our redis queue and restarting the background services, the CPU went down to 2% again.