Memory issue while retrieving events
Error in helper.logbook.controller.js:557
:
2021-12-16T14:02:21.288Z [debug]: getEvents
investigationId : 527799901
instrumentName : undefined
search : undefined
sortBy : _id
sortOrder : -1
skip : 0
limit : undefined
types : annotation,notification-comment,notification-error
format : json
username : 298168
fullName : Ida FAZLIC
isAdministrator : false
isInstrumentScientist : true
filterInvestigation : undefined
formattedDate : undefined
2021-12-16T14:02:21.289Z [debug]: Find clause is:
find : {"$and":[{"investigationId":527799901},{"$or":[{"type":"annotation"},{"type":"notification","category":"comment"},{"type":"notification","category":"error"}]}]}
2021-12-16T14:02:21.306Z [debug]: Count
find : {"$and":[{"investigationId":527799901},{"$or":[{"type":"annotation"},{"type":"notification","category":"comment"},{"type":"notification","category":"error"}]}]}
count : 230
2021-12-16T14:02:28.661Z [debug]: Database ops finished time to find:
time : 372.122054
events : 230
total : 230
find : {"$and":[{"investigationId":527799901},{"$or":[{"type":"annotation"},{"type":"notification","category":"comment"},{"type":"notification","category":"error"}]}]}
2021-12-16T14:02:28.662Z [debug]: Final time to find:
time : 373.09534
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
<--- Last few GCs --->
[25:0x55a9e8a45320] 482763 ms: Mark-sweep 584.8 (588.6) -> 584.6 (588.6) MB, 44.0 / 0.0 ms (average mu = 0.926, current mu = 0.000) last resort GC in old space requested
[25:0x55a9e8a45320] 482810 ms: Mark-sweep 584.6 (588.6) -> 584.6 (588.6) MB, 46.9 / 0.0 ms (average mu = 0.858, current mu = 0.000) last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x2971ba0008a1 <JSObject>
0: builtin exit frame: parse(this=0x2971ba01f199 <Object map = 0x6b9625c5341>,0x0e0547c00111 <Very long string[110386336]>,0x2971ba01f199 <Object map = 0x6b9625c5341>)
1: /* anonymous */ [0x837f0bb6ed9] [/icat/app/controllers/helpers/helper.logbook.controller.js:557] [bytecode=0x378bae37fc09 offset=121](this=0x2d4e17842261 <JSGlobal Object>,0x308e84faebd9 <JSArray[230]>,0x3f6862aaaa31 <...