DEV Community

Discussion on: Stumped about Rails Connection Limit Error

Collapse
 
xipher7934 profile image
Ethan

1) I've been setting my connection pool to my thread count... but based on an answer above, it seems like that may not be enough sometimes. I'm going to try increasing it, we'll see how that goes...

2) I will definitely be digging through my queries to see if I can optimize things.

Thanks!

Collapse
 
rhymes profile image
rhymes

Could you post somewhere your puma settings? A good practice is to basically multiply thread numbers by process numbers and then leave a margin of free connections to avoid getting to the limit.

My advice is to read this article and implement the suggestions, it has never failed me in the past :D

Configuring Puma, Unicorn and Passenger for Maximum Efficiency