Reputation: 755
We're experiencing some problems with the database connections at Amazon RDS. If you have a look at the graph below, the connections grow up and then suddenly fall down, like a sawtooth wave.
The database instance is a t2.small, but we changed it after the 150 peak to a t2.large, but sawtooth wave is still there, although not so wide.
There are several databases, mainly InnoDB, some MyIsam. Total size of tables is 0.87 GB, general_log and slow_log are activated.
The main problem is that we have to start a process with a lot of queries, which consumes a lot of database resources (it should take about 30 minutes, but only uses one connection), and when we start it, we always reach the max_connections limit and all the apps consuming this database break.
I don't understand why it grows and then falls down, I would be grateful if someone could explain this.
Also, after reaching max_connections, the database is blocked until we increase the instance class. This takes about 10 minutes.
We'd like not to upgrade database to a more powerful one, as this would be quite expensive. Perhaps there is something adjustable?
Thank you
Upvotes: 2
Views: 2148
Reputation: 2197
Looks like its an application related problem.
Check DB connection pool configurations of your applications.
If not successful, try to install a local database and check if the behavior remains.
Upvotes: 2