-
-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - UVICORN_WORKERS > 1 hangs Mealie on start #4354
Comments
I know my setup is a little different from the default, so I tried with the default postgres docker compose from your documentation, it also has the same issue, here's the docker-compose I used: services:
mealie:
image: ghcr.io/mealie-recipes/mealie:v1.12.0
container_name: mealie-test
restart: always
ports:
- "9925:9000" #
deploy:
resources:
limits:
memory: 1000M #
volumes:
- mealie-data:/app/data/
environment:
# Set Backend ENV Variables Here
ALLOW_SIGNUP: "false"
PUID: 1000
PGID: 1000
TZ: America/Toronto
UVICORN_WORKERS: 2
MAX_WORKERS: 1
WEB_CONCURRENCY: 1
BASE_URL: https://mealie.yourdomain.com
# Database Settings
DB_ENGINE: postgres
POSTGRES_USER: mealie
POSTGRES_PASSWORD: mealie
POSTGRES_SERVER: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: mealie
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: postgres-test
image: postgres:15
restart: always
volumes:
- mealie-pgdata:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: mealie
POSTGRES_USER: mealie
healthcheck:
test: ["CMD", "pg_isready"]
interval: 30s
timeout: 20s
retries: 3
volumes:
mealie-data:
mealie-pgdata: |
This issue is also present when using sqlite |
This appears to be a bug in uvicorn, fixed by this MR: encode/uvicorn#2373 fix was released in 0.30.2: encode/uvicorn#2380 mealie is on unicorn v0.30.0 |
Thanks for the investigation! Nightly is on the latest version of uvicorn so it should be fixed in the next release. If you need it now you can upgrade to nightly in the meantime. |
First Check
What is the issue you are experiencing?
When setting
UVICORN_WORKERS=2
, mealie can no longer start up.It gets caught in an endless loop of "waiting for child process" and then "child process died" and repeat
Steps to Reproduce
Set
UVICORN_WORKERS=2
and start mealie up.I am using the postgres17 as my database.
Please provide relevant logs
Mealie Version
ghcr.io/mealie-recipes/mealie:v1.12.0
Deployment
Docker (Linux)
Additional Deployment Details
No response
The text was updated successfully, but these errors were encountered: