#Testing Permify
1 messages · Page 1 of 1 (latest)
Hello @sharp radish , can you send me the command you used to run Permify in Docker? Which client are you trying to connect with when you receive this error?
May i know what client that you mean? 🫣
these are the commands I ran:
COMPOSE_PROJECT_NAME=permify docker compose up -d --remove-orphans --no-recreatepnpm permify:migrate
the docker-compose.yml included the details for postgres and permify
also noticed this error in docker desktop log
2024-05-08 18:20:08 time=2024-05-08T10:20:08.343Z level=ERROR msg="failed
to initialize database" error="failed to create write pool: MaxSize must be >= 1"
to add to @sharp radish 's comments above (we're teammates), permify is set up on the docker-compose file with the following config:
image: ghcr.io/permify/permify
restart: always
ports:
- 3476:3476
- 3478:3478
depends_on:
- postgres
command: ['serve']
# https://docs.permify.co/setting-up/configuration
environment:
PERMIFY_DATABASE_ENGINE: postgres
# Figure out a way to improve this... Currently `postgres` is referring to postgres `postgres` docker container.
PERMIFY_DATABASE_URI: postgresql://postgres:password@postgres/enterprise
PERMIFY_DATABASE_GARBAGE_COLLECTION_ENABLED: true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3476/healthz']
interval: 10s
retries: 10
start_period: 60s```
we can verify that postgres is up and running
this error is noticed on the permify container, it keeps hitting this error and trying to restart
Tried with the older permify version updated two days ago with the same error
Three of us are encountering this error on both Mac and Linux
Please add these environment variables to your compose file:
PERMIFY_DATABASE_MAX_OPEN_CONNECTIONS=100
PERMIFY_DATABASE_MAX_IDLE_CONNECTIONS=20
PERMIFY_DATABASE_MAX_CONNECTION_LIFETIME=300s
PERMIFY_DATABASE_MAX_CONNECTION_IDLE_TIME=60s
You can increase these values according to your own requirements.
Thank you, that worked!
Thanks for the solution, it worked!
A side question: why can some machines run without these environment variables?
If you are using the same version of Permify, this should not be happening; all should be giving errors without these environment variables