Is there a way to get a longer stacktrace when a node gets an error from memory?
<--- Last few GCs ---> 39984 ms: Scavenge 594.7 (636.8) -> 594.7 (637.8) MB, 0.5 / 0 ms (+ 0.0 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep]. 40058 ms: Mark-sweep 594.7 (637.8) -> 382.8 (411.8) MB, 73.7 / 0 ms (+ 32.0 ms in 5 steps since start of marking, biggest step 32.0 ms) [last resort gc]. 40096 ms: Mark-sweep 382.8 (411.8) -> 382.5 (409.8) MB, 38.0 / 0 ms [last resort gc]. <--- JS stacktrace ---> ==== JS stack trace ========================================= Security context: 07985C51 <JS Object> 1: Join(aka Join) [native array.js:158] [pc=2CE5D269] (this=079080C9 <undefined>,p=351F00A9 <JS Array[34]>,v=34,C=249FA8A5 <String[1]: ,>,B=07976BD1 <JS Function ConvertToString (SharedFunctionInfo 07945515)>) 2: InnerArrayJoin(aka InnerArrayJoin) [native array.js:335] [pc=2CE5C475] (this=079080C9 <undefined>,C=249FA8A5 <String[1]: ,>,p=351F00A9 <JS Array[34]>,v=34) 3: join [native array.... FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Only three stack trace lines are displayed. Is there a way to get more information about what happened right before the error?
I tried these node flags which didn't seem to help in this situation.
--trace_track_allocation_sites --stack_trace_limit=40 --builtins_in_stack_traces --stack_trace_on_illegal
In my case, after receiving and processing a database error (bad sql, not what I touch), after about 30 seconds I get the error from memory. As far as I can tell, my application does nothing in these 30 seconds. There are no additional calls from the client to the server (each call is written to the console), and when I launch it through the debugger, after the last step after 30 seconds it passes without debugging on any line (either if I wait, or if I pause).
The above value is from node 5.5.0. The error occurs at 0.12.9, but this version does not create a stack trace. node 4.2.6 give the same three-level stack trace.
source share