[PR #14580] [CLOSED] Fix JavaScript heap out of memory in Dockerfile build #62375

Closed
opened 2026-05-06 06:29:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/14580
Author: @comeback01
Created: 6/1/2025
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 Dockerfile (+1 -1)

📄 Description

Problem

The current Dockerfile fails during frontend build with "JavaScript heap out of memory" error when Node.js runs out of heap memory during the Vite build process.

Solution

Added NODE_OPTIONS='--max-old-space-size=6144' to the npm build command to allocate 6GB of heap memory for Node.js, resolving the memory allocation issue.

Changes

  • Modified RUN npm run build to RUN NODE_OPTIONS='--max-old-space-size=6144' npm run build in Dockerfile line ~39

Testing

  • ✅ Build completes successfully without memory errors
  • ✅ No functional changes to application behavior
  • ✅ Same approach successfully used in previous versions

Impact

  • Fixes build failures for users experiencing memory issues
  • Enables successful Docker builds on systems with limited memory
  • No breaking changes or performance impact on runtime

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/14580 **Author:** [@comeback01](https://github.com/comeback01) **Created:** 6/1/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`de3ebde`](https://github.com/open-webui/open-webui/commit/de3ebde6c70301a9852a2ef977f24045697221ee) Update Dockerfile ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+1 -1) </details> ### 📄 Description ## Problem The current Dockerfile fails during frontend build with "JavaScript heap out of memory" error when Node.js runs out of heap memory during the Vite build process. ## Solution Added `NODE_OPTIONS='--max-old-space-size=6144'` to the npm build command to allocate 6GB of heap memory for Node.js, resolving the memory allocation issue. ## Changes - Modified `RUN npm run build` to `RUN NODE_OPTIONS='--max-old-space-size=6144' npm run build` in Dockerfile line ~39 ## Testing - ✅ Build completes successfully without memory errors - ✅ No functional changes to application behavior - ✅ Same approach successfully used in previous versions ## Impact - Fixes build failures for users experiencing memory issues - Enables successful Docker builds on systems with limited memory - No breaking changes or performance impact on runtime --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 06:29:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#62375