I'm running a node.js service on my Ubuntu 16.04 server. I came across a problem recently, where I get this error message: "UFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory"
.
Now, I read here on SO that I can use something like: node --max-old-space-size=4096 yourFile.js
to fix this, however I don't start my service like that, I use supervisorctl start <servicename>
to start the service.
So, I am not sure how can I solve th problem in my case.
Can you suggest what should I do?