Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha User
Failed to start reactor-kitchensink - Java heap space error
I have also posted these details in github - see issue 212.
I followed the steps here to install / launch the kitchen sink app.
- npm install appears to complete successfully
- npm start causes the error below.
ENVIRONMENT
- Windows 10 Home
- node: 6.9.4
- npm: 4.6.1
10% building modules 2/2 modules 0 active
Project is running at
http://0.0.0.0:8084/
webpack output is served from /
Content not from webpack is served from ./build
404s will fallback to /index.html
94% asset optimization
building ExtReact bundle: ext => C:\sandbox\extjs-reactor\packages\reactor-kitchensink\build\ext-react
Wat!
configFile: C:\sandbox\extjs-reactor\packages\reactor-kitchensink\node_modules\@extjs\sencha-cmd\node_modules\@extjs\sencha-cmd-windows\dist\sencha.cfg
Sencha Cmd v6.5.0.180
[INF] Loading compiler context
[INF] Loading app json manifest...
[INF] Writing concatenated output to file C:\sandbox\extjs-reactor\packages\reactor-kitchensink\build\ext-react\ext.js
[INF] Appending concatenated output to file C:\sandbox\extjs-reactor\packages\reactor-kitchensink\build\ext-react\ext.js
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Java heap space
[ERR]
[ERR] Total time: 11 seconds
[ERR] com.sencha.exceptions.BasicException: Java heap space
undefined
(node:1452) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'toString' of undefined
-
Hi,
You need to adjust the memory settings of the JVM. You can do this by creating a _JAVA_OPTIONS environment variable with -Xmx2048m -XX:MaxPermSize=512m as value (that specifies a maximum of 2 GB memory and 512 MB for permanent generation).
If you want/need to increase this maximum, just change 2048 or 512 for the desired amount in megabytes.
Based on the error message you shared, you should see this issue go away just by setting -Xmx2048m but setting both is useful to also prevent java.lang.OutOfMemoryError: PermGen space errors in the future.
Israel Roldán | Senior Software Engineer (Framework tools)
-
Sencha User
@israelroldan Many thanks.
I had already found a similar solution. I used _JAVA_OPTIONS with a value of -Xms512m -Xmx1024m which solved the problem. For anyone else trying this solution, you can test your _JAVA_OPTIONS by running java -version which will return the _JAVA_OPTIONS value (if it has been set) in the first line.
Couple of things to note:
1. I did try -Xms512m -Xmx2048m but this gave me an error when running java -version - something like "... unable to allocate 2097152kb memory".
2. I had to restart my machine to get the options to take effect.
Anyway, thanks for the quick response. Very helpful.