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

prod build runs out of memory #75

Open
livtanong opened this issue Oct 16, 2016 · 3 comments
Open

prod build runs out of memory #75

livtanong opened this issue Oct 16, 2016 · 3 comments

Comments

@livtanong
Copy link

Stack Trace

<--- Last few GCs --->

  107608 ms: Mark-sweep 1360.1 (1435.2) -> 1360.1 (1435.2) MB, 2453.1 / 0.0 ms [allocation failure] [GC in old space requested].
  110077 ms: Mark-sweep 1360.1 (1435.2) -> 1360.1 (1435.2) MB, 2469.4 / 0.0 ms [allocation failure] [GC in old space requested].
  112562 ms: Mark-sweep 1360.1 (1435.2) -> 1363.6 (1419.2) MB, 2484.6 / 0.0 ms [last resort gc].
  115055 ms: Mark-sweep 1363.6 (1419.2) -> 1367.1 (1419.2) MB, 2492.4 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

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

Security context: 0x76241dcfb51 <JS Object>
    1: visitQueue [/Users/levi/repos/load-app/node_modules/babel-traverse/lib/context.js:~114] [pc=0x1ff0c180cb82] (this=0x380393cc8451 <a TraversalContext with map 0x35352b580b11>,queue=0xda0eadf7869 <JS Array[1]>)
    2: node [/Users/levi/repos/load-app/node_modules/babel-traverse/lib/index.js:~94] [pc=0x1ff0c1837a82] (this=0x2532e6106309 <JS Function traverse (SharedFunctionInfo 0x3f68fc267ad…

Reproduction

With a medium-complexity project...

  1. lein prod-build
  2. npm start
  3. react-native run-ios

Context

The problem occurred despite the following:

  • --max_old_space_size=8192 already set in project.pbxproj
  • In project.clj, :optimizations set to :simple
@seantempesta
Copy link

Okay, this is a dirty dirty hack, but it's the only way I could get my complex app to build.

facebook/react-native#5196 (comment)

@drapanjanas
Copy link
Owner

Hi, personally havent hit on this one yet (probably because never finished any real RN app so far) so cannot help. But it's interesting when you guys start to hit it? Is it starting after your index.ios.js reaches a certain size?

@seantempesta
Copy link

Well, I'm not exactly sure, but I'm guessing that's the case. react native walks the generated file for all dependencies and at some point it runs out of memory.

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

3 participants