MySQL connection on Amazon RDS t2.small performing very slow

amazon ec2amazon-rdsamazon-web-servicesrds

I'm very new to AWS. I've created a new RDS instance t2.small by following the previous one. I've selected all options as similar with the previous one. But the new instance is performing very slow, about 5 times slower than the previous one.

What I've found that, it's taking too much time to establish MySQL connection from the EC2. Sometimes it's more than 10s, and that time it shows connection timeout.

How can I reduce this time to establish mysql connection? I've got few answers about cache query, it didn't solve my problem.

Instance monitoring screenshot

Best Answer

We could solve the issue as following

  • Set all ports & traffics open from the security group before restart.
  • Restart the RDS instance
  • Remove again unnecessary security group items after restart.

Before restart

After restart