I have a MySQL database in AWS RDS. It is an r4.large machine with 16GB ram. I have been testing its load capacity and find out that upto 18 concurrent users, the app works fine. Then we decided to do a soak test on this application. At that time we saw the result or the response time got higher and higher.
Eg: On the first loop, the test completes in 1 minute for 3 APIs. On the 12th loop, I got a Bad Gateway error. On the 20th loop, the response time for a small API increased to nearly 1 minute (On first loop it was 4 seconds).
I'm not sure what makes this performance issue. I'm not an expert in RDS. What do I do to improve the performance or avoid this issue?