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

Crash on reading large objects #137

Open
gCurtisCT opened this issue Apr 17, 2015 · 1 comment
Open

Crash on reading large objects #137

gCurtisCT opened this issue Apr 17, 2015 · 1 comment

Comments

@gCurtisCT
Copy link

I'm trying to read a 640mb file using read(), and it crashes.

C:\Users\Jim\Desktop\video ingest\node_modules\q\q.js:128
                    throw e;
                          ^
RangeError: length > kMaxLength
    at new Buffer (buffer.js:194:21)
    at Function.join (C:\Users\Jim\Desktop\video ingest\node_modules\q-io\reader.js:123:14)
    at slurp (C:\Users\Jim\Desktop\video ingest\node_modules\q-io\reader.js:49:39)
    at C:\Users\Jim\Desktop\video ingest\node_modules\q-io\reader.js:64:30
    at _fulfilled (C:\Users\Jim\Desktop\video ingest\node_modules\q\q.js:794:54)
    at self.promiseDispatch.done (C:\Users\Jim\Desktop\video ingest\node_modules\q\q.js:823:30)
    at Promise.promise.promiseDispatch (C:\Users\Jim\Desktop\video ingest\node_modules\q\q.js:756:13
)
    at C:\Users\Jim\Desktop\video ingest\node_modules\q\q.js:564:44
    at flush (C:\Users\Jim\Desktop\video ingest\node_modules\q\q.js:110:17)
    at process._tickDomainCallback (node.js:459:13)

Is there anything I can do to avoid this?

@kriskowal
Copy link
Owner

You will probably need to appeal to a lower level API, or find a way to operate on your data as a stream instead of bringing it all into memory. There may be a memory leak inherent to Q-IO, so if you can get a heap dump and track down the objects, it might be helpful toward finding a fix.

I would be happy to enable you to fix Q-IO if you isolate the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants