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

Build: "Allocation failed - JavaScript heap out of memory" #6

Closed
rwieruch opened this issue Dec 16, 2017 · 1 comment
Closed

Build: "Allocation failed - JavaScript heap out of memory" #6

rwieruch opened this issue Dec 16, 2017 · 1 comment

Comments

@rwieruch
Copy link

rwieruch commented Dec 16, 2017

I am using your library in my own application to feed a neural network. Thanks for your efforts!

It runs without any problems locally. But when I try to build my application with npm with mnist included, it fails to build the project.

Creating an optimized production build...

<--- Last few GCs --->

[77896:0x102801600]    76919 ms: Mark-sweep 1408.1 (1463.6) -> 1408.0 (1445.6) MB, 3084.7 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 3085 ms) last resort
[77896:0x102801600]    79960 ms: Mark-sweep 1408.0 (1445.6) -> 1408.0 (1445.6) MB, 3040.6 / 0.0 ms  last resort


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x1e648c89cca1 <JSObject>
    2: token(aka token) [0x1e648c882241 <undefined>:1729] [bytecode=0x2efc0f2f56a1 offset=264](this=0x1e648c882241 <undefined>,type=0x2efc0f2eb451 <String[4]: punc>,value=0x1e648c8c1ed1 <String[1]: ,>,is_comment=0x1e648c882241 <undefined>)
    3: arguments adaptor frame: 2->3
    4: next(aka next) [0x1e648c882241 <undefined>:~2147] [pc=0x9b1f1e22da6](this=0x1e648c882241 <undefined>)
    5: expr_...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/mydspr/.nvm/versions/node/v8.3.0/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/mydspr/.nvm/versions/node/v8.3.0/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/mydspr/.nvm/versions/node/v8.3.0/bin/node]
...

These are my current node/npm versions:

→ node -v
v8.3.0
→ npm -v
5.6.0

Did you into this for your own application too?

@rwieruch
Copy link
Author

rwieruch commented Dec 16, 2017

Seems like the MNIST .json files are too large for the build step. Not sure if it is specific to my build or applies in general. In my case, I have just put the MNIST .json files outside of my build affected project and include them statically from a public folder. Maybe it helps others who run into this problem. Thanks for your library!

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

1 participant