Skip to content

Commit

Permalink
Fix potential out of memory issue by setting max workers in backend c…
Browse files Browse the repository at this point in the history
…ontainer
  • Loading branch information
StreetLamb committed Jun 29, 2024
1 parent 03ebfc8 commit 142272e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ [email protected]
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=
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ services:
env_file:
- .env
environment:
- MAX_WORKERS=${MAX_WORKERS}
- DOMAIN=${DOMAIN}
- ENVIRONMENT=${ENVIRONMENT}
- BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS}
Expand Down
1 change: 1 addition & 0 deletions local-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 142272e

Please sign in to comment.