Timeout acquiring a connection

Hi there.

A few days ago, an application I’m developing—which had been working normally—started showing an intermittent error when loading pages:

status: 500
message: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?

The error is inconsistent. Most of the time, the application shows this error, but sometimes it starts working again as it should, with good performance. However, at some point, it simply goes back to the same error… and stays that way for several minutes until a “miraculous” refresh brings the app back, and the cycle repeats.

Initially, I thought it was a database server issue (Supabase - OHIO), but I realized the problem only affects the communication between Render and Supabase. In my local environment, which connects to the same database, this error never happens!

I have an outdated version of the same application (which will be decommissioned soon) that also connects to Supabase, and no issues occur there.

What could be happening? Could you help me out?

Thanks,
Ivan.

UPDATE

I just deleted the web service and recreated it in a different region, and the issue no longer occurs. The problem only persists when I deploy the web service in US East - Ohio.

My application is running normally in US East - Virginia. However, this is not ideal since the Supabase servers are located in Ohio.

Could someone please look into this issue?