Closed mechanical-turk closed 6 years ago
When is this error occurring? During release or in runtime? Is there substantial traffic on the app when this occurs?
If you're explicitly using transactions, as the error suggests, please verify that the program code is not leaking connections.
It's definitely the case that Ghost on Heroku is preset for deployment with that minimal free database which only supports ten connections.
Raising that max
config might help or overload the DB's connection limit, and then upgrading the database will be the next step to support more connections.
Hi @mars ! We love the create-react-app buildpack :)
To answer your questions:
1) The error occurs during runtime. 2) We had a blog post that went semi-viral yesterday. However, the server kept up with the request for the most part. It crashed during a calmer time, which is curious. 3) We are using the free tier JAWSDB, so that could be the source of the issue as well. 4) We haven't modified any of the application's business logic. We just wrote a little bit of css. Therefore if this issue is caused by some transaction issue, it is likely that it comes from the main source code. (just fyi)
We'll raise the connection limit to a 10 for now, just to be on the safer side. If it persists, we'll upgrade our db plan.
Sounds good! Note that the connection pool max is per-dyno. Therefore, if the app is scaled-up beyond a single dyno (recommended for production), or if it's using preboot which doubles the number of dynos during a deployment, then the connection count may easily surpass the database's limit. That's why I have it preset to half the database limit by default.
We just saw this error today. Any ideas how to approach this issue? We are thinking about increasing the max pool size from 5 to 7-8. Not sure if it will resolve the issue though. Has anyone seen this error before?