Memory leak?

mstevens's Avatar

mstevens

05 Apr, 2012 08:50 PM

There appears to be a memory leak (somewhat related to my last thread "Importing database dump from 6.8.2 to 7.0b2").

Cascade is working fine with our production db imported, but I'm noticing some weird behavior that may indicate a memory leak.

> free -m
             total       used       free     shared    buffers     cached
Mem:          4012       3958         54          0        113       1517
-/+ buffers/cache:       2328       1684
Swap:         8189        624       7564

catalina.out is 1.9G, cascade.log is 7.2M.

I'm attaching cascade.log and catalina from yesterday (since todays is too big).

Let me know if I can provide more info.

  1. Support Staff 2 Posted by Bradley Wagner on 05 Apr, 2012 11:25 PM

    Bradley Wagner's Avatar
    • What behavior are you noticing that is indicating a memory leak?
    • How much memory do you have allocated to the JVM -- -Xmx in your startup script?
    • How much memory is the Java process itself taking up? Used top to determine this.
  2. 3 Posted by mstevens on 06 Apr, 2012 02:33 PM

    mstevens's Avatar

    1) While the application seems to be functioning fine, the log files seem to be filling up with errors and warnings.

    cascade.log is getting filled up with this message:
    ERROR [MemoryQueueSearchJobScheduler] An error occurred while consuming from the lucene event queue: java.lang.NullPointerException

    catalina.out is getting populated with these:
    log4j:ERROR Error occured while converting date.
    java.lang.NullPointerException
    log4j:ERROR Error occured while converting date.
    java.lang.NullPointerException
    ERROR [MemoryQueueSearchJobScheduler] : An error occurred while consuming from the lucene event queue: java.lang.NullPointerException

    The catilna log i posted in my original message had some language about a memory leak, and combined with the free RAM seeming low, i thought it might be a possibility.

    2) I have 512M allocated to the JVM (-Xmx512M) and 4GB total on the rackspace instance.

    3) There appears to be 8 java processes, with RES of 708m, 262m, 249m, 243m, 140m, 111m, 106m , and 89m.

  3. Support Staff 4 Posted by Bradley Wagner on 06 Apr, 2012 02:48 PM

    Bradley Wagner's Avatar

    Do you recognize the 8 Java processes? If not, I would recommend kill-ing all of them and then starting Cascade itself to ensure there is only a single Java process running.

    Let's see if that has any effect on the error messages in catalina.out.

  4. 5 Posted by mstevens on 06 Apr, 2012 03:23 PM

    mstevens's Avatar

    I decided to reboot and also test out cascade start on reboot (command in /etc/rc.local).

    It worked, and now there's only one java process. Not sure how it got to that point before. I may have accidentally ran "cascade.sh start" as the root user instead of the cascade user, but I could be wrong.

    In any case, I'm no longer seeing the error messages in the logs.

    Thank you!

  5. 6 Posted by mstevens on 06 Apr, 2012 04:07 PM

    mstevens's Avatar

    Just a quick follow up. When stopping cascade using "sh cascade.sh stop", there seem to be some noteworthy messages logged to catalina.out (see attached).

  6. Support Staff 7 Posted by Bradley Wagner on 06 Apr, 2012 04:37 PM

    Bradley Wagner's Avatar

    Thanks. We're aware of those. They would be concerning if they showed up when the application was running but given that they appear to only happen on shutdown, we're less concerned about it.

  7. 8 Posted by mstevens on 06 Apr, 2012 04:40 PM

    mstevens's Avatar

    That makes sense. Thanks again, Bradley!

  8. mstevens closed this discussion on 06 Apr, 2012 04:40 PM.

Comments are currently closed for this discussion. You can start a new one.