admin管理员组文章数量:1416642
My node server crashes with the following logs.
<--- Last few GCs --->
504158 ms: Mark-sweep 1379.9 (1434.3) -> 1379.0 (1434.3) MB, 1486.7 / 0.0 ms [allocation failure] [GC in old space requested].
505610 ms: Mark-sweep 1379.0 (1434.3) -> 1379.0 (1434.3) MB, 1452.0 / 0.0 ms [allocation failure] [GC in old space requested].
507067 ms: Mark-sweep 1379.0 (1434.3) -> 1379.0 (1406.3) MB, 1456.1 / 0.0 ms [last resort gc].
508505 ms: Mark-sweep 1379.0 (1406.3) -> 1379.0 (1406.3) MB, 1438.3 / 0.0 ms [last resort gc].
I understand Mark-sweep is a GC algorithm. How do we interpret these numbers "1379.9 (1434.3) -> 1379.0 (1434.3) MB, 1486.7 / 0.0 ms" after that?
My node server crashes with the following logs.
<--- Last few GCs --->
504158 ms: Mark-sweep 1379.9 (1434.3) -> 1379.0 (1434.3) MB, 1486.7 / 0.0 ms [allocation failure] [GC in old space requested].
505610 ms: Mark-sweep 1379.0 (1434.3) -> 1379.0 (1434.3) MB, 1452.0 / 0.0 ms [allocation failure] [GC in old space requested].
507067 ms: Mark-sweep 1379.0 (1434.3) -> 1379.0 (1406.3) MB, 1456.1 / 0.0 ms [last resort gc].
508505 ms: Mark-sweep 1379.0 (1406.3) -> 1379.0 (1406.3) MB, 1438.3 / 0.0 ms [last resort gc].
I understand Mark-sweep is a GC algorithm. How do we interpret these numbers "1379.9 (1434.3) -> 1379.0 (1434.3) MB, 1486.7 / 0.0 ms" after that?
Share Improve this question edited Feb 7, 2019 at 22:04 Eric Liprandi 5,5843 gold badges54 silver badges72 bronze badges asked Aug 3, 2018 at 21:42 Eugene LurksEugene Lurks 1111 silver badge12 bronze badges1 Answer
Reset to default 7These are reported metrics at the end of a GC mark-sweep (go through, mark for removal, then sweep the marked items). The two numbers are start and end of the total object size and total memory size.
So at the beginning your total object size is 1379.9 and your total memory size is 1434.4 MB. At the end your total object size is 1379.0 and your total memory size is 1434.3 MB. So 0.9 MB was freed.
I'm not 100% certain about the timings, but I believe the first is the total external time spent (which seems to be total time spent in certain "scopes")
Here's the source code you want: https://github./nodejs/node/blob/de732725d8ae232d7b6d56927ea8bef471d5bf1d/deps/v8/src/heap/gc-tracer#L481
Regarding external time spent: https://github./nodejs/node/blob/de732725d8ae232d7b6d56927ea8bef471d5bf1d/deps/v8/src/heap/gc-tracer.h#L368
本文标签: javascriptHow to understands logs when nodejs process crashes out of memoryStack Overflow
版权声明:本文标题:javascript - How to understands logs when nodejs process crashes out of memory - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745255540a2650075.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论