This discussion is archived
8 Replies Latest reply: Aug 31, 2012 7:21 AM by Boomer RSS

java.lang.OutOfMemoryError

898496 Newbie
Currently Being Moderated
Hello,

For two weeks, when launching the job "Delayed Provisioning", the task stops after 20 minutes. In the server log, I get the following error:
Exception in thread "[SSL: ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=20103]]" java.lang.OutOfMemoryError

For information, i have only 500 users and the job stops after 250 users.

Do you have any idea ? Is it a problem in configuration, jvm... ?

Regards.
  • 1. Re: java.lang.OutOfMemoryError
    801120 Explorer
    Currently Being Moderated
    check your jvm memory and set.

    Below setting is for tomcat,

    Add -Xms1024m -Xmx1024m -XX:MaxPermSize=128m into catalina.bat in set JAVA_OPTS part

    Like: for windows and for unix please check catalina.sh and incease memory in JAVA_OPTS

    set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=128m
  • 2. Re: java.lang.OutOfMemoryError
    898496 Newbie
    Currently Being Moderated
    Thanks.

    I will test this.
  • 3. Re: java.lang.OutOfMemoryError
    898496 Newbie
    Currently Being Moderated
    The JVM is already set to 1024MB.

    Another idea ?
  • 4. Re: java.lang.OutOfMemoryError
    handat Expert
    Currently Being Moderated
    That's rather low memory settings really, but more importantly, how much physical memory do you actually have on your server. If it is running on decent hardware with a decent OS, you could increase the heap space allocation to a few gigs but don't go overboard or you will pay a performance hit during garbage collection.

    try 2GB first and then increase gradually

    set JAVA_OPTS=%JAVA_OPTS% -Xms2048m -Xmx2048m -XX:MaxPermSize=512m
  • 5. Re: java.lang.OutOfMemoryError
    user9326077 Newbie
    Currently Being Moderated
    Hi,

    did you do an update/upgrade lately?

    If you did and are running Oracle Waveset 8.1.1.2 or newer you might want to set these two parameters in Waveset.properties:

    sessions.trackUserAllocations=false
    sessions.trackAdminAllocations=false

    I've seen an "OutOfMemoryError" in one environment and a new patch level. Setting the above two parameters to "false" solved the issue.

    Regards
  • 6. Re: java.lang.OutOfMemoryError
    898496 Newbie
    Currently Being Moderated
    With 2go the JVM, there's not java OutOfMemory Error.

    But now, the task run 20 minutes and update users. But after 20 miutes, nothing happens when there are still accounts to update.

    Any idea ? Timeout, Time limit, provisioning limit ??
  • 7. Re: java.lang.OutOfMemoryError
    handat Expert
    Currently Being Moderated
    OutOfMemoryErrors also happen a lot when you are opening a lot of network connections, at a much higher rate than closing them. It usually happens when you reached a resource or network limit on the resource side and it refuses to give you more connections, blacklist you for a period for attempting too many connections. However, Waveset resource connections unless you have configured it obey certain limits will just try to continuously connect to the resource and attempt it again after each failed attempt until it runs out of memory and dies.
    To fix this situation you can do two things:

    - ensure that the resource you are connecting to is able to handle the amount of requests, and add a limit to the connector to prevent it from opening too many connections and also increase the retry timeout so it doesn't hit the resource every 5 seconds (default).

    - increase the memory allocated to the JVM. This is required because the default allocation works for very small number of users/requests so it fine in dev environments, but for real use where you have a lot more users and things to process, you will need a lot of additional memory.
  • 8. Re: java.lang.OutOfMemoryError
    Boomer Newbie
    Currently Being Moderated
    I agree with handat. Originally our heap was set at 1GB, but frequently ran out of memory. After bumping to 2GB, we've never had that issue. It was always related to reconciliation tasks which are looking at 20,000+ accounts.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points