cannot allocate wasm memory in CPanel
See original GitHub issueEnvironment
- Operating System:
Linux
- Internal Host System: CPanel
- Node Version:
v16.15.0
- Nuxt Version:
3.0.0-rc.12
- Nitro Version:
0.6.0
- Package Manager:
yarn@1.22.19
- Builder:
vite
- User Config:
runtimeConfig
,globalName
,modules
,build
,vite
,i18n
- Runtime Modules:
@nuxtjs/i18n@8.0.0-beta.1
,nuxt-lodash@2.3.0
,@pinia/nuxt@0.4.3
- Build Modules:
-
Reproduction
Fresh Nuxt 3 project
Describe the bug
Running the Nuxt server using PM2 always gives a 500-page error and prints this error in logs, Note that the server can run using other tools like CPanel Supervisor
Additional context
No response
Logs
51|yarn run start-prod | [nuxt] [request error] [unhandled] [500] WebAssembly.instantiate(): Out of memory: wasm memory
51|yarn run start-prod | at node:internal/deps/cjs-module-lexer/dist/lexer:1:33593
51|yarn run start-prod | at async initCJSParse (node:internal/modules/esm/translators:64:5)
51|yarn run start-prod | at async ESMLoader.commonjsStrategy (node:internal/modules/esm/translators:156:18)
51|yarn run start-prod | [nuxt] [request error] [unhandled] [500] WebAssembly.instantiate(): Out of memory: wasm memory
51|yarn run start-prod | at node:internal/deps/cjs-module-lexer/dist/lexer:1:33593
51|yarn run start-prod | at async initCJSParse (node:internal/modules/esm/translators:64:5)
51|yarn run start-prod | at async ESMLoader.commonjsStrategy (node:internal/modules/esm/translators:156:18)
51|yarn run start-prod | [nuxt] [request error] [unhandled] [500] WebAssembly.instantiate(): Out of memory: wasm memory
51|yarn run start-prod | at node:internal/deps/cjs-module-lexer/dist/lexer:1:33593
51|yarn run start-prod | at async initCJSParse (node:internal/modules/esm/translators:64:5)
51|yarn run start-prod | at async ESMLoader.commonjsStrategy (node:internal/modules/esm/translators:156:18)
51|yarn run start-prod | [nuxt] [request error] [unhandled] [500] WebAssembly.instantiate(): Out of memory: wasm memory
51|yarn run start-prod | at node:internal/deps/cjs-module-lexer/dist/lexer:1:33593
51|yarn run start-prod | at async initCJSParse (node:internal/modules/esm/translators:64:5)
51|yarn run start-prod | at async ESMLoader.commonjsStrategy (node:internal/modules/esm/translators:156:18)
51|yarn run start-prod | [nuxt] [request error] [unhandled] [500] WebAssembly.instantiate(): Out of memory: wasm memory
51|yarn run start-prod | at node:internal/deps/cjs-module-lexer/dist/lexer:1:33593
51|yarn run start-prod | at async initCJSParse (node:internal/modules/esm/translators:64:5)
51|yarn run start-prod | at async ESMLoader.commonjsStrategy (node:internal/modules/esm/translators:156:18)
51|yarn run start-prod | [nuxt] [request error] [unhandled] [500] WebAssembly.instantiate(): Out of memory: wasm memory
51|yarn run start-prod | at node:internal/deps/cjs-module-lexer/dist/lexer:1:33593
51|yarn run start-prod | at async initCJSParse (node:internal/modules/esm/translators:64:5)
51|yarn run start-prod | at async ESMLoader.commonjsStrategy (node:internal/modules/esm/translators:156:18)
Issue Analytics
- State:
- Created a year ago
- Comments:18 (8 by maintainers)
Top Results From Across the Web
How to solve "out of wasm memory" of next.js app in node.js ...
What I can suggest is to first check if you have any zombie processes or ones allocating a lot of rams and stop...
Read more >Cannot allocate memory - cPanel Forums
My host says I'm using too many resources. And I see in cPanel for my sites that resources have been limited to use...
Read more >Chasing Memory Bugs through V8 and WebAssembly
WebAssembly is key to enable critical, CPU-bound tasks on the web, which abound in our OS-like ... Memory(): could not allocate memory.
Read more >WebAssembly.Memory - MDN Web Docs
The WebAssembly.Memory object is a resizable ArrayBuffer or SharedArrayBuffer that holds the raw bytes of memory accessed by a WebAssembly.
Read more >RangeError: WebAssembly.instantiate(): Out of memory: wasm ...
Describe the issue/error/question Hello all, I try to install N8N on my server, everything seems to have worked but when I launch N8N...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@danielroe I hope that might help, from a fresh nuxt project hosted on a CPanel VPS
Environment
Linux
v16.15.0
3.0.0-rc.12
0.6.0
yarn@1.22.19
vite
-
-
-
Reproduction
This project running script exists in ecosystem.config.js nuxt.zip pm2 command:
pm2 start ecosystem.config.js
logs
I have been running a node Express app in cPanel for over 6 months without issues but suddenly started getting the same error when trying to load a package (imagemin).
const imagemin = (await import("imagemin")).default // this line throws the error
The error occurs:
The error does not occur:
I am running node version 16.6.1
EDIT: I rebooted the server and the error went away