最近在armv8架构下,运行jupyterhub的docker,报错如下:
#
# Fatal process OOM in insufficient memory to create an Isolate
#
<--- Last few GCs --->
<--- JS stacktrace --->
Trace/breakpoint trap (core dumped)
查了许久,都说是node的一个问题,需要设置参数:--max-old-space-size
但机子内存有32g,即使设置到8192,至少有一些运行结果了,但最后仍报这个错。问题未解决。
RUN set NODE_OPTIONS=--max-old-space-size=8192
有说是版本问题试着升级nodejs版本到14以上。
在docker中升级旧的版本:
RUN npm cache clean -f && npm install -g n && n stable
问题解决。
参考资料
https://stackoverflow.com/questions/48387040/how-do-i-determine-the-correct-max-old-space-size-for-node-js
https://stackoverflow.com/questions/16898001/how-to-install-a-specific-version-of-node-on-ubuntu
https://blog.csdn.net/u010533742/article/details/124293618