Skip to content

The open alternative to Salesforce, designed for AI.

[DOCS] Error Workaround twenty-server start on WSL - JavaScript heap out of memory (#15047)

PurvaPc2a477a9d683
diff --git a/packages/twenty-website/src/content/developers/self-hosting/troubleshooting.mdx b/packages/twenty-website/src/content/developers/self-hosting/troubleshooting.mdx
index 1b764e91a4c..35ef7cc1274 100644
--- a/packages/twenty-website/src/content/developers/self-hosting/troubleshooting.mdx
+++ b/packages/twenty-website/src/content/developers/self-hosting/troubleshooting.mdx
@@ -72,6 +72,18 @@ In `packages/twenty-front/.env` uncomment `VITE_DISABLE_TYPESCRIPT_CHECKER=true`
**If it does not work:**
Run only the services you need, instead of `npx nx start`. For instance, if you work on the server, run only `npx nx worker twenty-server`
+**If it does not work:**
+If you tried to run only `npx nx run twenty-server:start` on WSL and it's failing with the below memory error:
+
+`FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory`
+
+Workaround is to execute below command in terminal or add it in .bashrc profile to get setup automatically:
+
+`export NODE_OPTIONS="--max-old-space-size=8192"`
+
+The --max-old-space-size=8192 flag sets an upper limit of 8GB for the Node.js heap; usage scales with application demand.
+Reference: https://stackoverflow.com/questions/56982005/where-do-i-set-node-options-max-old-space-size-2048
+
**If it does not work:**
Investigate which processes are taking you most of your machine RAM. At Twenty, we noticed that some VScode extensions were taking a lot of RAM so we temporarily disable them.