My app is connected to a PostgreSQL database hosted on Supabase.
I have it set up to connect to the database directly. However while programming and testing, my database keeps overflowing with connections. As far as I understand it, Appsmith is supposed to pool to only 5 connections, but right now after working in Appsmith for only about 30 minutes I have 20 connections from 18.104.22.168.
Supabase has its own connection pooler, should I be using that in addition to Appsmith’s pooler?
@felix-appsmith I’m connected to the string/port above connection pooling on that window, not the one inside that settings box. (Port 5432, not 6543) which should mean I’m bypassing Supabase’s internal connection pooling
However I’m testing to make sure…
Disabled it and then did a bunch of navigation in edit mode of my app. Now I’m up to 25 connections from the Appsmith IP.
I have a number of different queries. It looks like the problem is at any one time, Appsmith makes 5 connections (like it should) and it stays at 5 if I keep working with it. However if I let it idle long enough I think it thinks those 5 connections should close and it opens a fresh 5, but Supabase is still holding on to the first 5.
They do EVENTUALLY time out. After a weekend of not working on the project those connections are gone, but if I’m off and on the project all day it can hit my connection limit by the end of the day and I have to reboot the server.
If this isn’t a configuration error, I’ll open a bug report. I’ll also probably route Appsmith’s connection through Supabase’s in-house connection pooler and just let it manage it until this is resolved. I just usually assume I’ve done something wrong before I open a bug report.