node-clinic icon indicating copy to clipboard operation
node-clinic copied to clipboard

Analysing dataRangeError: Invalid string length

Open AlexeyMoiseev opened this issue 3 years ago • 3 comments

Current Behavior

Error or analyse step after 10 minute of execution:

Analysing dataRangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at zeroEks (/usr/local/lib/node_modules/clinic/node_modules/0x/index.js:56:51)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Steps to Reproduce (for bugs)

  1. clinic doctor/flame/* -- node ./http.js
  2. "wrk" for 10 minutes
  3. CTRL+C

Environment

  • Clinic.js v12.0.0, Doctor v10.0.0
  • Node.js v18.12.1, npm v9.1.2
  • Operating system and version: MacOS v12.6.1

AlexeyMoiseev avatar Dec 07 '22 17:12 AlexeyMoiseev

Without a reproducible example, I can't help. Could you provide it?

RafaelGSS avatar Dec 08 '22 00:12 RafaelGSS

I have faced the exact issue. clinic doctor worked but clinic flame did not and failed with this error.

[   =] Analysing dataRangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at zeroEks (/home/faheem/.nvm/versions/node/v16.19.0/lib/node_modules/clinic/node_modules/0x/index.js:56:51)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

I am trying to figure out performance issue with an API take took 837014.152 ms to respond and the total memory used during this session was around 4.5 GBs.

For the session length, the API actually blocked the event loop because for loops were running. The API is so bad.

I believe this is cause of very large array? This might be related: https://stackoverflow.com/questions/29175877/json-stringify-throws-rangeerror-invalid-string-length-for-huge-objects

mfaheemakhtar avatar Mar 06 '23 12:03 mfaheemakhtar

any movement on this? I'm getting the identical error.

nodejs 16.13

Craigzyc avatar Jan 30 '25 16:01 Craigzyc