We set environment variables for the
# spicedb
k
We set environment variables for the read/write settings but these don't seem to be getting picked up. We are running the latest version (1.29.1) via docker (within AWS ECS as it happens). We can see within PostgreSQL that the "max" values seem to be used for the number of connections only. The pool never seems to dynamically size at all between the min/max values. The max value definitely seems honoured too as we halved it from the defaults and saw a change in number of connections. We don't have any load on SpiceDB at present so its not a case of it needing all the connections. Are we misunderstanding what these values do? For reference we set the env vars via terraform, here's their name and values:
Copy code
SPICEDB_DATASTORE_CONN_POOL_READ_MIN_OPEN = 1
    SPICEDB_DATASTORE_CONN_POOL_READ_MAX_OPEN = 10
    SPICEDB_DATASTORE_CONN_POOL_WRITE_MIN_OPEN = 1
    SPICEDB_DATASTORE_CONN_POOL_WRITE_MAX_OPEN = 5
v
Hey @Kent Chenery, I looked into this and detected that min connections were being ignored and defaulting to the max connections instead: https://github.com/authzed/spicedb/pull/1747. Does that reflect what you observe? Any chances you could test this branch on your deployment?
k
Hi @vroldanbet , yep that does look like it'd be the problem! I'll see if we can get this tested for you.
Tested this locally and the min values are honoured now. Fix looks good @User!
j
@Kent Chenery fix has been merged
it should go out in the next release
k
I saw that thanks! When do releases go out?
j
depends on when changes get merged; there are two outstanding PRs to go in before the next release
likely we'll start the release process this week, so early next week if I had to guess
v
@Kent Chenery you can also fetch the nightly build container image if you are cool running in a non official release for now
k
Thanks. Happy to wait. If we were desperate I'd build our own version of the container (from your Dockerfile).
v
sounds good!