Results 1 to 6 of 6

Thread: Using UglifyCompressor gives GC overhead limit exceeded

  1. #1
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,294

    Default Using UglifyCompressor gives GC overhead limit exceeded

    Code:
    PS C:\Projects\platformscExtJS5\app> sencha app build
    Sencha Cmd v5.1.3.60
    [INF] Processing Build Descriptor : default
    [INF] Loading app json manifest...
    [INF] Appending content to C:\Projects\platformscExtJS5\app/bootstrap.js
    [INF] Writing content to C:\Projects\platformscExtJS5\app/bootstrap.json
    [INF] Compressing data with UglifyCompressor
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: GC overhead limit exceeded
    [ERR]   at org.mozilla.javascript.gen.C__SenchaCmd_5_1_3_60_Sencha_Cmd_5_1_3_60_js_uglify_js_2.c
    [ERR] all(Unknown Source)
    [ERR]
    [ERR] Total time: 1 minute 40 seconds
    [ERR] The following error occurred while executing this line:
    C:\Projects\platformscExtJS5\app\.sencha\app\build-impl.xml:266: The following error occurred while executing this line:
    
    
    C:\Projects\platformscExtJS5\app\.sencha\app\js-impl.xml:71: com.sencha.exceptions.BasicException: GC overhead limit exc
    eeded

  2. #2
    Sencha User
    Join Date
    Jun 2014
    Location
    Murmansk, Russia
    Posts
    277

    Default

    Have you found any solution?

  3. #3
    Sencha User
    Join Date
    Dec 2009
    Posts
    3

    Default

    Hi,

    First check out you java version if 64bit is installed. This is because you will have to change your java heap space parameter in the main sencha.cfg and .sencha/app/sencha.cfg file. The 32 bit java version does not let you to allocate more memory then 2GB.

    After you have intalled 64bit java, you have to add the following parameter to your sencha.cfg files. In the main sencha.cfg file (that is where the sencha is installed in your system ie:C:\Users\userName\bin\Sencha\Cmd\6.0.2.14):

    cmd.jvm.args=-Xms1024m -Xmx8192m -Dapple.awt.UIElement=true -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError -XX:-UseConcMarkSweepGC

    and in .sencha/app/sencha.cfg:

    app.cmd.jvm.args=-Xms1024m -Xmx8192m -Dapple.awt.UIElement=true -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError -XX:-UseConcMarkSweepGC

    and do not forget to comment the line in both files:

    # cmd.jvm.use.32bit=1 (This will disable the use of 32bit java if both versions are installed)

    You may ofcourse change the heap size according to your own need... The first number 1024 is the minimum required and the other one is the maximum allowed...

    Best...

  4. #4
    Sencha User
    Join Date
    Dec 2009
    Posts
    3

    Default An addition after 1 year...

    Quote Originally Posted by ozgehan View Post
    Hi,

    First check out you java version if 64bit is installed. This is because you will have to change your java heap space parameter in the main sencha.cfg and .sencha/app/sencha.cfg file. The 32 bit java version does not let you to allocate more memory then 2GB.

    After you have intalled 64bit java, you have to add the following parameter to your sencha.cfg files. In the main sencha.cfg file (that is where the sencha is installed in your system ie:C:\Users\userName\bin\Sencha\Cmd\6.0.2.14):

    cmd.jvm.args=-Xms1024m -Xmx8192m -Dapple.awt.UIElement=true -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError -XX:-UseConcMarkSweepGC

    and in .sencha/app/sencha.cfg:

    app.cmd.jvm.args=-Xms1024m -Xmx8192m -Dapple.awt.UIElement=true -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError -XX:-UseConcMarkSweepGC

    and do not forget to comment the line in both files:

    # cmd.jvm.use.32bit=1 (This will disable the use of 32bit java if both versions are installed)

    You may ofcourse change the heap size according to your own need... The first number 1024 is the minimum required and the other one is the maximum allowed...

    Best...
    Sometime the crash is done by the ANT that the Sencha is using I guess...

    If the above does not work, you may try to enter

    SET ANT_OPTS="cmd.jvm.args=-Xms1024m -Xmx8192m -Dapple.awt.UIElement=true -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError -XX:-UseConcMarkSweepGC"

    in the command line before you start your build. Or you may also set this parameter from Control Panel-> System -> Environment Variables...

  5. #5

    Default

    I am curious, how long should the build process take with UglifyCompressor?

    With Yui it takes about 1min but with Uglify I cancled the build after 30mins.

  6. #6
    Sencha User
    Join Date
    Jun 2014
    Location
    Murmansk, Russia
    Posts
    277

    Default

    Quote Originally Posted by svennergr View Post
    With Yui it takes about 1min but with Uglify I cancled the build after 30mins.
    The same thing. Moved to closure.

Similar Threads

  1. Custom JS build without the scaffolding overhead?
    By richardtallent in forum Ext 5: Q&A
    Replies: 2
    Last Post: 18 Jul 2014, 9:01 AM
  2. [OPEN] If localStorage limit is exceeded the relevant item is deleted
    By madpoet in forum Sencha Touch 2.x: Bugs
    Replies: 1
    Last Post: 10 Mar 2014, 12:46 PM
  3. ComponentMgr overhead.
    By chris-mac in forum Community Discussion
    Replies: 2
    Last Post: 15 Jul 2009, 3:43 PM
  4. Json/XML overhead
    By tomlobato in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 15 Jan 2009, 7:10 AM
  5. Observe each AJAX request. Overhead?
    By xpurpur in forum Community Discussion
    Replies: 2
    Last Post: 14 Jul 2008, 10:39 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •