cancel
Showing results for 
Search instead for 
Did you mean: 

Magento using a lot of connections

Magento using a lot of connections

Spoiler
Hello,

I use Aurora MySql.
I have 20 Magento websites using this MySql, 1 database each website.

My problem is:
1 > I don't know why but i have websites consuming 1 connection and others consuming 5?
2 > Why Magento 2 keep connections with cleaned up state?
3 > Why the connection refresh is each 1 minute?

because of these connections and updates the cpu rate is always above 60%

+----------------+---------+----------------------+----------+-----------+

| db | command | state | count(*) | max(time) |
+----------------+---------+----------------------+----------+-----------+
| NULL | Query | executing | 1 | 0 |
| NULL | Sleep | cleaned up | 1 | 0 |
| NULL | Sleep | delayed send ok done | 3 | 80 |
| 01_db | Sleep | cleaned up | 4 | 0 |
| 02_db | Query | preparing | 1 | 0 |
| 02_db | Sleep | cleaned up | 4 | 1 |
| 03_db | Sleep | cleaned up | 4 | 0 |
| 04_db | Sleep | cleaned up | 5 | 1 |
| 05_db | Query | cleaned up | 1 | 0 |
| 05_db | Sleep | cleaned up | 6 | 0 |
| 06_db | Sleep | cleaned up | 4 | 0 |
| 07_db | Query | cleaned up | 1 | 0 |
| 08_db | Sleep | cleaned up | 4 | 1 |
| 09_db | Sleep | cleaned up | 4 | 0 |
| 09_db | Sleep | delayed send ok done | 1 | 0 |
| 10_db | Sleep | cleaned up | 4 | 1 |
| 11_db | Sleep | cleaned up | 4 | 1 |
| 12_db | Sleep | cleaned up | 5 | 1 |
| 13_db | Sleep | cleaned up | 4 | 0 |
| 14_db | Sleep | cleaned up | 4 | 0 |
| 15_db | Sleep | cleaned up | 4 | 0 |
+----------------+---------+----------------------+----------+-----------+

 

Any idea how to solve it?