Replies: 3 comments 2 replies
-
Scale up your database to match the amount of requests you take on? Or scale down the web app so it does not take on more work than the database can handle? |
Beta Was this translation helpful? Give feedback.
-
@dentarg After scale down the response time improves a bit but not enough. On other test we changed the configuration of workers and threads to 8 workers and 20 threads. But our application during all the day are under the number of 40 but at the peak of requests goes to 320. So how can we try to solve the problem. Have 40 connections generates 100% of usage of database during 10min |
Beta Was this translation helpful? Give feedback.
-
btw. Is it normal that almost the 40 connections available appears with status idle? |
Beta Was this translation helpful? Give feedback.
-
We have an application running in 2 or 6 ec2 c5x.large AWS instances.
Our configuration is:
4 worker 5 threads
Usually we use two instances but in a specific time we are sending a push notifications to users what ends on mmany user entering at same time generating this situation.
We have 8 instances with 4 workers and 5 threads but number of database connections is around 40. But in 1 minute we pass from 50-60 connections to 120 connections. Generating a peak of database cpu usage and ending on a poor response time.
So we are trying to prevent this problem. We assume that as the database cpu is busy generating the new connections our queries are in waiting status generating a problem on response time.
Once connections are created and number request is not too big the response time goes back to his normal result.
Any advise on this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions