Reaction: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory?

Created on 27 Oct 2017  路  8Comments  路  Source: reactioncommerce/reaction

image

OS: Windowns 10 Enterprise 64 bits

reaction -v

Node: 6.11.4
NPM: 5.5.1
Meteor Node: 4.8.4
Meteor NPM: 4.6.1
Reaction CLI: 0.19.1
Reaction: 1.5.4
Reaction branch: master

Expected behavior

normal start app at 3000 port

Actual behavior

fatal error

Steps to reproduce the behavior

windows 10 enterprise
1.install meteor
2.install reaction-cli
3.reaction init
4.reaction run.

Most helpful comment

umm, not sure if this helps cause I'm a nub by all counts, but I'm running similar environment to nsrtky and getting the same error.

Win 10 64bit
and reaction -v results:

Node: 6.11.3
NPM: 3.10.10
Meteor Node: 4.8.4
Meteor NPM: 4.6.1
Reaction CLI: 0.20.0
Reaction: 1.5.6
Reaction branch: master

All 8 comments

I have entered reaction directory and run meteor -v comment so app started run but show nothing.
here log file for your acknowledgment.

=> Started proxy.
=> Started MongoDB.
W20171027-17:28:33.871(3)? (STDERR) Note: you are using a pure-JavaScript implementation of bcrypt.
W20171027-17:28:33.960(3)? (STDERR) While this implementation will work correctly, it is known to be
W20171027-17:28:33.961(3)? (STDERR) approximately three times slower than the native implementation.
W20171027-17:28:33.962(3)? (STDERR) In order to use the native implementation instead, run
W20171027-17:28:33.962(3)? (STDERR) 
W20171027-17:28:33.963(3)? (STDERR)   meteor npm install --save bcrypt
W20171027-17:28:33.964(3)? (STDERR) 
W20171027-17:28:33.964(3)? (STDERR) in the root directory of your application.
W20171027-17:28:33.965(3)? (STDERR) WARNING:
W20171027-17:28:33.965(3)? (STDERR) cfs:graphicsmagick could not find "graphicsMagic" or "imageMagic" on the
W20171027-17:28:33.966(3)? (STDERR) system.
W20171027-17:28:33.967(3)? (STDERR) 
W20171027-17:28:33.967(3)? (STDERR) I just checked PATH to see if I could find the GraphicsMagick or ImageMagic
W20171027-17:28:33.968(3)? (STDERR) unix/mac os/windows binaries on your system, I failed.
W20171027-17:28:33.968(3)? (STDERR) 
W20171027-17:28:33.969(3)? (STDERR) Why:
W20171027-17:28:33.969(3)? (STDERR) 1. I may be blind or naive, help making me smarter
W20171027-17:28:33.970(3)? (STDERR) 2. You havent added the path to the binaries
W20171027-17:28:33.971(3)? (STDERR) 3. You havent actually installed GraphicsMagick or ImageMagick
W20171027-17:28:33.971(3)? (STDERR) 
W20171027-17:28:33.972(3)? (STDERR) *** Make sure "$PATH" environment is configured "PATH:/path/to/binaries" ***
W20171027-17:28:33.972(3)? (STDERR) 
W20171027-17:28:33.973(3)? (STDERR) Installation hints:
W20171027-17:28:33.973(3)? (STDERR) * Mac OS X "brew install graphicsmagick" or "brew install imagemagick"
W20171027-17:28:33.974(3)? (STDERR) * Linux download rpm or use packagemanager
W20171027-17:28:33.975(3)? (STDERR) * Centos "yum install GraphicsMagick"* Windows download the installer and run
I20171027-17:28:33.976(3)? 14:28:23.264Z  INFO Reaction: Load default data from /private/data/
I20171027-17:28:33.976(3)? 14:28:23.352Z  INFO Reaction: JobServer started
I20171027-17:28:33.977(3)? 14:28:23.361Z  WARN Reaction: Skipped loading settings from reaction.json.
I20171027-17:28:33.977(3)? 14:28:23.493Z  INFO Reaction: Reaction Version: 1.5.4
I20171027-17:28:33.977(3)? 14:28:23.518Z  INFO Reaction: Reaction initialization finished.
=> Started your app.

=> App running at: http://localhost:3000/
   Type Control-C twice to stop.

@nsrtky What OS are you on and can you let me know what the results of reaction -v are?

OS: Windowns 10 Enterprise 64 bits

reaction -v

Node: 6.11.4
NPM: 5.5.1
Meteor Node: 4.8.4
Meteor NPM: 4.6.1
Reaction CLI: 0.19.1
Reaction: 1.5.4
Reaction branch: master

umm, not sure if this helps cause I'm a nub by all counts, but I'm running similar environment to nsrtky and getting the same error.

Win 10 64bit
and reaction -v results:

Node: 6.11.3
NPM: 3.10.10
Meteor Node: 4.8.4
Meteor NPM: 4.6.1
Reaction CLI: 0.20.0
Reaction: 1.5.6
Reaction branch: master

Also getting the same issue:
Node: 6.9.1
NPM: 3.10.8
Meteor Node: 8.8.1
Meteor NPM: 5.4.2
Reaction CLI: 0.20.0
Reaction: 1.5.6
Reaction branch: master
Docker: 17.09.0-ce
Memory peaks at about a gig and then the process just crashes

This is a duplicate of #3023. I think we should probably close this and move the conversation there so we can have it all in one place.

But the short answer is try using the TOOL_NODE_FLAGS environment variable to set the amount of RAM the Meteor tool can use for the build.

# You can try messing with the amount, but FYI, more is not necessarily better
export TOOL_NODE_FLAGS="--max-old-space-size=2048"

# start Reaction
reaction

See also...

https://stackoverflow.com/questions/16586705/configuring-v8s-memory-management-to-be-smart-for-a-node-js-process/16591881#16591881

It's a little outdated and the default amounts probably aren't correct anymore, but it has been confirmed to solve the above problem. The only issue is that it appears to behave differently on different machines or OS's and you need to mess with the amount.

so just to clarify my understanding of that stackoverflow post, does that mean this is mainly due to way reaction has been set up? not splitting single processes into several workers accordingly? forgive the nub question, I always assume that my understanding of something is wrong before I reach the another conclusion.

No, it means that the Reaction build (which is performed by Meteor) is a single process that can't be split up. And that's not really optional because it has to happen in a specific order.

See my additional updates from earlier today here https://github.com/reactioncommerce/reaction/issues/3023#issuecomment-342510093

Was this page helpful?
0 / 5 - 0 ratings