out of memory java heap memory

Help
Stefan
2013-09-19
2014-09-03
  • Stefan

    Stefan - 2013-09-19

    Hi all,

    while trying to crawl a file list, i am getting "java out of memory heap space" while "Extracting file path list".

    I tried to add more memory to the VM. For that i was adding memory to the start.sh.
    It now looks like the following:

    if [ -z "$OPENSEARCHSERVER_DATA" ]; then
    OPENSEARCHSERVER_DATA=pwd/data
    export OPENSEARCHSERVER_DATA
    fi

    CATALINA_OPTS="-Xms768m -Xmx768m -server"
    export CATALINA_OPTS

    exec "$EXECUTABLE"

    But in the monitoring tab "system" the max memory is still around "256mb".

    What can i do now?

    Thanks!

    Best Regards

    Stefan

     
  • Naveen A.N

    Naveen A.N - 2013-09-19

    Hello Stefan,

    For windows you have to edit the start.bat file.

    Please find the attachment of the start.bat file with CATALINA OPTS enabled.

    Naveen.A.N

     
  • Stefan

    Stefan - 2013-09-19

    Hey Naveen,

    thank you for your fast reply.

    I tried it and it is working fine for me now.

    Your help and support is really nice and helpfull!

    Best Regrads

    Stefan

     
  • Andrew Fordred

    Andrew Fordred - 2014-09-02

    Suddenly having massive problems with this. Installed v1.5.5 - build 5428a8550 on running the server noticed it slowed until eventually it threw a java heap error.
    Tried the steps here and when adding CATALINA OPTS no real difference. When using the start.bat file proposed by Naveen above, it does not run at all. Reverted back to the original start.bat as attached, initially free memory starts 600MB then drops and can get to levels as low as 1.8MB, this is the error:
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Sep 02, 2014 6:05:10 PM org.zkoss.bind.impl.ParamCall call:117
    SEVERE:
    java.lang.OutOfMemoryError: Java heap space

    Sep 02, 2014 6:05:12 PM org.zkoss.zk.ui.impl.UiEngineImpl handleError:1362
    SEVERE: >>java.lang.OutOfMemoryError: Java heap space

    Exception in thread "Index: Int1 WebCrawlThread Tue Sep 02 17:47:39 WAT 2014" ja
    va.lang.OutOfMemoryError: Java heap space

    Any help please.

     
  • Andrew Fordred

    Andrew Fordred - 2014-09-02

    Thanks Alexandre
    Still does not help, cannot even get total memory up to 2G the best is 989.9MB, somewhere I am doing something wrong. After about 20 minutes it crashes Java heap space.

     
  • Alexandre Toyer

    Alexandre Toyer - 2014-09-03

    Hi Andrew,

    Can you please send me a screenshot of tab Runtime / System?

    How many memory does your computer have?

    Regards,
    Alexandre

     
    Last edit: Alexandre Toyer 2014-09-03
  • Andrew Fordred

    Andrew Fordred - 2014-09-03

    Hi Alexandre

    Please find attached screenshot.

    Computer memory is 4GB windows 7 system 64bit.

    Start.bat looks like this:
    @echo off

    if "%OS%" == "Windows_NT" setlocal

    rem Move to the directory containing this script
    cd %cd%

    set LANG=en_US.UTF-8

    rem The directory containing the indexes
    set OPENSEARCHSERVER_DATA=%cd%\data
    set CATALINA_OPTS=-server -Xms2G -Xmx2G
    cd %cd%\apache-tomcat-7.0.37
    call "%EXECUTABLE%"

    rem The TCP port used by the server
    set SERVER_PORT=9090

    rem Any JAVA option. Often use to allocate more memory. Uncomment this line to allocate 2GB.
    set JAVA_OPTS=-Xms1G -Xmx1G

    rem Starting the server
    java %JAVA_OPTS% -jar opensearchserver.jar -extractDirectory server -httpPort %SERVER_PORT% -uriEncoding UTF-8 -Doss.externalparser.classpath=%cd%/lib/ext/*

    Thanks again

     
  • Alexandre Toyer

    Alexandre Toyer - 2014-09-03

    Hi Andrew,

    in your start.bat file you have to replace line

    set JAVA_OPTS=-Xms1G -Xmx1G
    

    by

    set JAVA_OPTS=-Xms2G -Xmx2G
    

    You can replace "2G" by "3G", "4G", etc.

    Regards,
    Alexandre

     
  • Andrew Fordred

    Andrew Fordred - 2014-09-03

    doesn't even run the command line window flashes and disappears again

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks