Increasing the connection slots for non bulk upserts in a loop

Hi,

while using the loop in a workflow to upsert data entries in the retool database, we often get the following error:

"Too many clients and remaining connection slots are reserved for non-replication superuser connections"

Now I know that the best solution to avoid this problem is using the bulk upsert, but in some cases this is not an option, for example when you can't filter for a single primary key but have to filter for at least 2 values instead.

Also the performance of the workflows is not always consistent. Sometimes the error occurs when trying to upsert 200 or more data entries and sometimes the system can't even handle 2 dozen entries.

Is there any way to increase the numbers of connection slots or any possibility to work around this limitation? What is the limit for replication connections?

Thanks in advance for any ideas.

Hey @ConDev - This is ultimately due to the platform we're hosting Retool DB, we just migrated your account to the new infrastructure we're moving to that shouldn't hit this. We're also working on migrating all accounts in the near future.

2 Likes