Skip to content

Commit

Permalink
Merge pull request #226 from sebdanielsson/potential-oom-error
Browse files Browse the repository at this point in the history
Add tips for solving out-of-memory issues
  • Loading branch information
tjbck authored Sep 25, 2024
2 parents e97a9ab + fac8b6e commit 6b41db6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/getting-started/development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,18 @@ This setup involves mounting the `pipelines` directory to ensure any changes ref
This configuration uses volume bind-mounts. Learn more about how they differ from named volumes [here](https://docs.docker.com/storage/bind-mounts/).
:::

Through these setup steps, both new and experienced contributors can seamlessly integrate into the development workflow of Open WebUI. Happy coding! 🎉
## 🐛 Troubleshooting

### FATAL ERROR: Reached heap limit

When you encounter a memory-related error during the Docker build process—especially while executing `npm run build`—it typically indicates that the JavaScript heap has exceeded its memory limit. One effective solution is to increase the memory allocated to Node.js by adjusting the `NODE_OPTIONS` environment variable. This allows you to set a higher maximum heap size, which can help prevent out-of-memory errors during the build process. If you encounter this issue, try to allocate at least 4 GB of RAM, or higher if you have enough RAM.

You can increase the memory allocated to Node.js by adding the following line just before `npm run build` in the `Dockerfile`.

```docker title=/Dockerfile
ENV NODE_OPTIONS=--max-old-space-size=4096
```

---

Through these setup steps, both new and experienced contributors can seamlessly integrate into the development workflow of Open WebUI. Happy coding! 🎉

0 comments on commit 6b41db6

Please sign in to comment.