feat(docs/troubleshooting): clarify RAM allocation to XO (#4881)

This commit is contained in:
Jon Sands 2020-03-23 04:36:25 -04:00 committed by GitHub
parent c061505bf8
commit ab3129b9c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,14 +90,12 @@ FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memo
1: node::Abort() [node]
```
In that case, you need to increase the memory allocated to the
XOA VM (from 2GB to 4 or 8 GB), and then update the service file
(`/etc/systemd/system/xo-server.service`) to increase the allocated
memory to xo-server itself:
In that case, you need to increase the memory allocated to the XOA VM (from 2GB to 4GB or 8GB). Note that simply increasing the RAM for the VM is not enough. You must also edit the service file (`/etc/systemd/system/xo-server.service`) to increase the memory allocated to the xo-server process itself.
**Note:** you should leave ~512MB for the debian OS itself. Meaning if your VM has 4096MB total RAM, you should use `3584` for the memory value below.
```diff
- ExecStart=/usr/local/bin/xo-server
+ ExecStart=/usr/local/bin/node --max-old-space-size=8192 /usr/local/bin/xo-server
+ ExecStart=/usr/local/bin/node --max-old-space-size=3584 /usr/local/bin/xo-server
```
The last step is to refresh and restart the service: