Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analysing dataRangeError: Invalid string length #374

Open
AlexeyMoiseev opened this issue Dec 7, 2022 · 2 comments
Open

Analysing dataRangeError: Invalid string length #374

AlexeyMoiseev opened this issue Dec 7, 2022 · 2 comments
Labels
waiting info Waiting information (reproducible code) from the issue owner.

Comments

@AlexeyMoiseev
Copy link

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
@RafaelGSS
Copy link
Contributor

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

@mfaheemakhtar
Copy link

mfaheemakhtar commented Mar 6, 2023

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

@RafaelGSS RafaelGSS added the waiting info Waiting information (reproducible code) from the issue owner. label Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting info Waiting information (reproducible code) from the issue owner.
Projects
None yet
Development

No branches or pull requests

3 participants