• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    JAVA - Out of Memory

    User help
    3
    7
    2.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mihairosu
      last edited by

      Our server installation has crashed twice so far in the past week due to this:

      ERROR 2017-08-01T15:52:21,362 (com.serotonin.m2m2.rt.maint.BackgroundProcessing$RejectableWorkItemRunnable.run:559) - Error in work item
      java.lang.OutOfMemoryError: Java heap space
      
      

      Version: core 3.1.1+20170620163725 (Build number: 20170620163725) - Enterprise

      We used to run it with 2GB without any problems, but since we have the available memory I've increased it to 4GB from now on.

      What's the permanent way to increase java memory size?

      Is this the method I should?

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        Hi mihai,

        Arguments to control the heap size are passed in the ext-available scripts. You probably want a script like....

        #!/bin/bash
        case "$1" in
            init)
                # Startup with Java Memory setup for Large installation
                JAVAOPTS="$JAVAOPTS -Xms3200m -Xmx3200m"
                ;;
        esac
        

        if you're only running Mango on that machine. Place it in ext-enabled.

        Did anything change in the configuration recently?

        1 Reply Last reply Reply Quote 0
        • M
          mihairosu
          last edited by

          There was one major change, which was the upgrade to 3.0.

          So I've created a symbolic link as in my original post, since I noticed that it's essentially the same instructions that you gave.

          How can I confirm that the changes worked?

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            You can see if the JVM has the arguments by doing a ps $(pidof java) at the command line. If you've passed the argument there, Java got it. You should also see it reflected on the internal metrics page.

            1 Reply Last reply Reply Quote 0
            • M
              mihairosu
              last edited by

              I've been away for two weeks but we haven't had any more crashes since increasing the heap size. Thank you.

              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by

                Glad to hear it!

                1 Reply Last reply Reply Quote 0
                • danD
                  dan
                  last edited by

                  Old thread I know, but I've been having this same issue on a RPi installation.
                  I hard set the memory and I think it might have fixed the issue.

                  Cheers
                  Dan

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post