williamdclt
11/28/2023, 1:48 PM--datastore-conn-min-open
(and similar options), by replacing it with the new read/write configs. I kept similar values, but the pool behaved completely differently 🤔 it created a ton more connections, which was unexpected.
Config before:
--datastore-conn-max-idletime=2m \
--datastore-conn-max-lifetime=2m \
--datastore-conn-min-open=10 \
--datastore-conn-max-open=200\
Config after:
--datastore-connpool-read-max-idletime=2m
--datastore-connpool-write-max-idletime=2m
--datastore-connpool-read-max-lifetime=2m
--datastore-connpool-write-max-lifetime=2m
--datastore-connpool-read-min-open=10
--datastore-connpool-read-max-open=200
--datastore-connpool-write-min-open=10
--datastore-connpool-write-max-open=10
The total connection count jumped from a very stable 90 to >400 when I deployed the config change, for no reason that I can think of. Am I missing something? Is that a known behaviour?
I'm on SpiceDB 1.22.2williamdclt
11/28/2023, 2:05 PMmax-open
limit is reached?vroldanbet
11/28/2023, 2:39 PMserve help
just in case you are hitting some issue there, I know there should be a fallback if you use connpool
instead of conn-pool
but just in case:
--datastore-conn-pool-read-healthcheck-interval duration amount of time between connection health checks in a remote datastore's connection pool (default 30s)
--datastore-conn-pool-read-max-idletime duration maximum amount of time a connection can idle in a remote datastore's connection pool (default 30m0s)
--datastore-conn-pool-read-max-lifetime duration maximum amount of time a connection can live in a remote datastore's connection pool (default 30m0s)
--datastore-conn-pool-read-max-lifetime-jitter duration waits rand(0, jitter) after a connection is open for max lifetime to actually close the connection (default: 20% of max lifetime)
--datastore-conn-pool-read-max-open int number of concurrent connections open in a remote datastore's connection pool (default 20)
--datastore-conn-pool-read-min-open int number of minimum concurrent connections open in a remote datastore's connection pool (default 20)
--datastore-conn-pool-write-healthcheck-interval duration amount of time between connection health checks in a remote datastore's connection pool (default 30s)
...
vroldanbet
11/28/2023, 2:40 PMwilliamdclt
11/28/2023, 2:44 PMconnpool
in 1.21.x but conn-pool
in higher versions (not sure about 1.22.x, I just jumped to 1.25.x). Worth a trywilliamdclt
11/28/2023, 2:47 PMvroldanbet
11/28/2023, 2:51 PMvroldanbet
11/28/2023, 2:54 PMwilliamdclt
11/28/2023, 3:00 PMdatastore-conn
options to the new datastore-conn-pool-read/write
ones 😅 I'll test out this dash differencevroldanbet
11/28/2023, 3:00 PMwilliamdclt
11/28/2023, 3:24 PMconn-pool
, connections are still jumping up
https://cdn.discordapp.com/attachments/1179056100486680606/1179080298026242048/image.png?ex=65787b19&is=65660619&hm=fd50ccf003f46c4e25ae0cb49c39bc4d6c96f10a4651c8c13ef8785aa327c71a&williamdclt
11/28/2023, 3:30 PMmax
option?jzelinskie
11/28/2023, 3:40 PMjzelinskie
11/28/2023, 3:40 PMjzelinskie
11/28/2023, 3:45 PMwilliamdclt
11/28/2023, 3:47 PMdatastore-conn-max-open
? And what is the min
option for then, if the pool is kept maxed out at all times?jzelinskie
11/28/2023, 3:49 PMvroldanbet
11/28/2023, 3:54 PMmin-conns
, and as far as I know pgx
still supports itjzelinskie
11/28/2023, 4:26 PMjzelinskie
11/28/2023, 7:40 PMwilliamdclt
11/29/2023, 5:34 PMwilliamdclt
11/29/2023, 5:36 PMwilliamdclt
11/29/2023, 5:38 PM