How to solve "out of wasm memory" of next.js app in node.js via cpanel?

Viewed 36

I have a next.js app in production and when i try to upload it to the server via node.js app in cpanel i cant get it to work. I created the app following a tutorial and everything seems to work fine if the app is newly created but in my case i already have the full app ready. So when i try npm run dev or npm start i get always the same error that says not enough wasm memory.

Out of WASM memory when starting next.js app

Seeing this repeatedly i search all i could and found this post :

Shell command to show the limits

Of course i tried it and this i what i got:

enter image description here

The problem is that i don't know hot to unlimit the max memory size (-m) and virtual memory (-v). I also tried contacting the server support but it seems they take some time to even answer and i have a deadline in this project.

This is a screenshot of the full root directory in cyberduck, i don't know if it helps:

enter image description here

Thanks in advance.

1 Answers

The issue might not be related to your own application but rather not enough memory(ram) of your cPanel hosting account. What I can suggest is to first check if you have any zombie processes or ones allocating a lot of rams and stop them using the "top" command. If this is not the case, you might want to ask your hosting provider's tech support to take a further look and see what can be done. If they lack support, I would recommend switching to a suitable NodeJS web host.

Related