Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configurable connection pool #987

Merged
merged 1 commit into from Oct 26, 2020

Conversation

raymondjacobson
Copy link
Member

Trello Card Link

Description

Moves connection pool to a config var, currently deployed on staging w/ 2000 max connections.
I'm somewhat convinced that we need to just dramatically increase our max connections. I've noticed that during high load, our RDS instance is totally fine but it seems like simple endpoints like /health_check struggle to grab a connection.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.MaxConnections
We can definitely up this number a lot, though I'm not sure at which point node is just unable to utilize. I think it's worth a shot on prod though.

Services

  • Creator Node

Does it touch a critical flow like Discovery indexing, Creator Node track upload, Creator Node gateway, or Creator Node file system?

Delete an option.

  • ✅ Nope

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.
Include log analysis if applicable.

  1. Currently running on staging cn 3 @ 2000. Used locust to load test, saw no noticeable difference in performance when just spamming /health_check, but did see that more than 100 connections were used (500 concurrent requests ended up using 170 connections).

Copy link
Contributor

@dmanjunath dmanjunath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm game to try setting a much higher number and seeing what happens

@jowlee
Copy link
Contributor

jowlee commented Oct 26, 2020

I'm not sure if this is the issue b/c if you look at the RDS performance insights for creator nodes, it's showing a max of 50 concurrent active sessions. I think we need to increase the size of the rds instance w/ more CPU, we surpassed the vCPU which queues the requests, I believe
Screen Shot 2020-10-26 at 11 42 18 AM

@raymondjacobson
Copy link
Member Author

I'm not sure if this is the issue b/c if you look at the RDS performance insights for creator nodes, it's showing a max of 50 concurrent active sessions. I think we need to increase the size of the rds instance w/ more CPU, we surpassed the vCPU which queues the requests, I believe
Screen Shot 2020-10-26 at 11 42 18 AM

It doesn't make sense to me that under heavy load requests to the db take a long time from the web server and not from navicat/psql. This to me screams "need more connections"

@jowlee
Copy link
Contributor

jowlee commented Oct 26, 2020

Yeah, looks like we are maxing out the num connections too.
Screen Shot 2020-10-26 at 12 28 39 PM

@raymondjacobson
Copy link
Member Author

Yeah, looks like we are maxing out the num connections too.
Screen Shot 2020-10-26 at 12 28 39 PM

Each of those dips is the server crashing

@raymondjacobson raymondjacobson merged commit e79bf15 into master Oct 26, 2020
@raymondjacobson raymondjacobson deleted the rj-connection-pool-hotfix branch October 26, 2020 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants