diff --git a/.env.example b/.env.example index d6c147eb..54a438e7 100644 --- a/.env.example +++ b/.env.example @@ -19,6 +19,7 @@ FIRST_SUPERUSER=admin@example.com FIRST_SUPERUSER_PASSWORD=changethis USERS_OPEN_REGISTRATION=False MAX_UPLOAD_SIZE=50_000_000 +MAX_WORKERS=4 # llm provider keys. Add only to models that you want to use OPENAI_API_KEY= diff --git a/docker-compose.yml b/docker-compose.yml index 61225b30..5309052b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,6 +66,7 @@ services: env_file: - .env environment: + - MAX_WORKERS=${MAX_WORKERS} - DOMAIN=${DOMAIN} - ENVIRONMENT=${ENVIRONMENT} - BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS} diff --git a/local-deployment.md b/local-deployment.md index d6a82b62..f360b480 100644 --- a/local-deployment.md +++ b/local-deployment.md @@ -83,5 +83,6 @@ Once the containers are running, you can access various services through the fol - **Adminer**: [http://adminer.localhost/](http://adminer.localhost/) ## Troubleshooting +- **Out of Memory**: If you are getting the `Worker (pid:14) was sent SIGKILL! Perhaps out of memory?` error, this is due to the number of processes started for the backend container consuming more memory than what is available. You can fix this by decreasing `MAX_WORKERS` in your `.env` file. - **Unable to login to Traefik Dashboard**: Ensure that username and password is correct. If you are using zsh, `USERNAME` environment variable corresponds to the real user ID of the shell process, so you shold use your user ID as the username. - **Cannot login to Adminer**: Set 'System' to `PostgreSQL` and set the 'server' field should be `db`. The other fields should follow the values in your `.env` file. \ No newline at end of file