Hi everybody. We have a prisma 2.x web app, and un...
# orm-help
p
Hi everybody. We have a prisma 2.x web app, and until a few weeks we had no performance problems. We moved the backend from a vps host to a french PAAS provider (Scalingo). Our db (postgre) is still the same managed instance. Since this migration, we have problems with timed out requests, and logs show connexion pooling issues. We tried to play with the settings mentionned in https://www.prisma.io/docs/guides/performance-and-optimization/connection-management , but no success so far. We have few info about what happens, and we’re currently setting up more serious monitoring tools. Did you encounter this kind of issues on other PAAS ?
r
@providenz 👋 I think an issue with any performance metrics that you have would be great here. Also are you using any sort of connection pooler like PgBouncer? @janpio do we have any issue for this specifically?
j
No, this looks more like a specific configuration thing. The mention of moving the backend from provider to provider could indicate that the connection between server and db is just not fast enough any more now 😞 If the connection take longer, all you can do is increase the timeouts really - but if those are hit, your users already have a pretty bad experience.
p
👋 thanks for your replies.
This describes our issues
j
response time?
the big increase is from when you switched hosts?
p
Sometimes, all request are blocked by the pool timeout. We don’t have 3d party connction pooler
No the big increase happens from times to times, without obvious explanation
j
ah ok, so for some time the median just goes up by a lot and then back to normal?
p
Yes
j
what is the y axis here? 5 and 20s?
what is your setup? serverless, serverful, what framework? how much traffic generally? database config - how many connectino are accepted? How many of those are usually in use (and specifically when this happens)?
p
Th y axis is in ms
We use apollo, on a heroku-like PAAS (scalingo). We have to restart the app from time to time, it’s the only way to solve the problem.
We just tried to tweak parameters mentioned in https://github.com/prisma/docs/issues/1657, and it might help
We have 10 connections allowed, increasing them does not really help because when it happens, they are all taken and never released
j
What is the connection usage situation when the numbers spike like this? What is the connection limit of that database?