Hi, sorry if is not the correct channel...
We use this stack: Drizzle + Hyperdrive + Neon for full intensive processing.
Neon has the maximum configuration, with 4,000 connections (and 10,000 pooled).
In a production environment, we noticed that when we reached the limit of 4,000 (according to the Neon dashboard), we started getting a worker error saying "Timed out while waiting for an open slot in the pool."
And even though the system load had decreased, we still got the error and still saw 4,000 active connections in Neon. Only by forcing a restart of the pool connections (by lowering and raising the number of CPUs), Hyperdrive released the connections and the system recovered. However, upon its return, it was only using 100 connections. This suggests that the other 3,900 were never released.
The Hyperdrive configuration is using the Neon connection string used by its connection pool.
This is out drizzle's use:
const cnx1: Pool = new Pool({
host: hd.host,
user: hd.user,
password: hd.password,
port: Number(hd.port),
database: hd.database,
idleTimeoutMillis: 10000, (WE TRY WITH OTHERs TOO)
connectionTimeoutMillis: 5000,
min: 0, (WE TRY WITH 1, 5, etc)
max: 5, (WITH OTHERS too)
ssl: false,
});
return drizzle(cnx1);
We have an expected Hyperdrive configuration with a maximum soft-limit connection of 500. Our workers use 8 Hyperdrives in a round-robin strategy. This allows us to reach 4,000 active connections.
Thanks in advance MartΓn