Skip to content
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

mod: entrypoint for docker to setup db even in server with less memory #5815

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

TheSpiritMan
Copy link
Contributor

Hello team,

  • Modified File: packages/twenty-docker/twenty/entrypoint.sh

  • Reason: The current entrypoint.sh works fine for server with RAM more than 8GB. But the server with less RAM will give error while running scripts/setup-db.ts.
    setup-db-failed

  • My commit: It will set NODE_OPTIONS="--max-old-space-size=8192" in docker entrypoint which guarantee to run the script successfully.

@lucasbordeau
Copy link
Contributor

lucasbordeau commented Jul 19, 2024

@TheSpiritMan According to :

To sum up :

  • V8 computes the max-old-space-size to roughly 50% of the available memory if no parameter is passed to Node
  • We consider that a common memory size for a VM is 2GB
  • So we set it to 1.5GB
  • We added a paragraph in the doc to put a system requirement at 2GB or more RAM

@lucasbordeau lucasbordeau merged commit 7e80cd5 into twentyhq:main Jul 19, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants