any suggestions for scaling postgres / serverless?...
# orm-help
e
any suggestions for scaling postgres / serverless? we’re using postgres prisma and struggling to write often. writing perhaps 30 new records per second consistently and we added
pgbouncer=true&pool_timeout=60
to our database url but we’re still getting timeouts on not enough connections. db has 1gb ram and 1 cpu seeing this error a lot:
Timed out fetching a new connection from the connection pool. (More info: <http://pris.ly/d/connection-pool>, Current connection limit: 17)
h
am facing a similar problem. did u find a solution?
e
not yet. continuing on it now
will probably add retries myself. but annoying it gets to this situation to begin with
g
This might help

https://www.youtube.com/watch?v=iyGZ8JFPgoY

c
I've been looking at and trying various options for a greenfield project and came to the conclusion that serverless is currently a poor fit for Postgres, unless you're dealing with MASSIVE traffic spikes you're going to be much better off spinning up an actual server to connect to your database, and both should be adequately provisioned. My smart phone from several years ago has 4GB RAM and 8 CPUs, that should tell you something about your current setup.