We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

OC 3.1.2 memory leaks on shutdown

Hello threre,

I´m running OC 3.1.2 on Windows Server 2008 R2 (16GB mem, Quad core processor) fine for more than two years, but continue to have the memory leak SEVERE log on tomcat shutdow. I also see my memory usage growing slowly, but thanks to my 16GB it´s not an issue (but requires shutdown/start up to get memory ussage on shape again).


I searched the forum but did not get a clear answer on the issue (I´ve followed installation instruction, the only difference is Windows 2008 R2 instead of 2003, and permormed other installs with the same memory leak comming back). Is there a solution to the issue:

Here some lines from the catalinga log (lots of this are thrown, see attach)

30/07/2014 22:01:23 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/OpenClinica] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
30/07/2014 22:01:23 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
GRAVE: The web application [/OpenClinica] appears to have started a thread named [[email protected]] but has failed to stop it. This is very likely to create a memory leak.
30/07/2014 22:01:23 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads


Thanks in advacnce. REgards, Juan.



  • kristiakkristiak Posts: 1,329 ✭✭✭

    Have you configured Tomcat as per the attached picture?

  • juan.debonisjuan.debonis Posts: 36

    Yes kristiak,
    (see attach) the only difference is that as I'm using OC 3.1.2, and as I followed the official doc, the jdk is 6.0.24 and Tomcat 6

    Any suggestions?
  • kristiakkristiak Posts: 1,329 ✭✭✭

    I remember there was a problem with memory loaeks some time ago wnich was resolved in the next release. Have you tried to upgrade?

    Best regards


  • juan.debonisjuan.debonis Posts: 36
    No, but I've been testing 3.1.4 and had the same issues (perhaps it was solved in 3.2.x and above). I read on other discussions about folder permissions, but did not found the concrete solution, so I do not really know if that is the real problem. Thanks again. Juan.
  • kristiakkristiak Posts: 1,329 ✭✭✭
    One more thing, You should get rid of any other Java installation on the server. You can try to clear out any other JAVA and just have JDK running, I tried to install OC one on on old server that had several old Java applications installed. I caused memory leaks!
  • juan.debonisjuan.debonis Posts: 36

    Thanks again Kristiak! but sadly not my case. This is a fresh new install, including Windows.



  • kristiakkristiak Posts: 1,329 ✭✭✭

    I'm sorry to hear that, Our configuration is exactly like yours, Windows server 2008 R2 running with 16 Gb RAM  on a HP server OC 3.2 and we have never seen any memory leaks. Sorry but I have run out of ideas!

    Best regards


  • juan.debonisjuan.debonis Posts: 36

    Thanks a lot Krister for you comments!


    I will try to search the bug tracker for OC 3.1.2 and if possible test OC 3.2.x or above (to check our expertise setting up OC?). Upgrading is not so easy as we have performed some customizations on javascript side, and would have to test/validate them again for the new release (someday we will have to do that anyway!).


    If anyone has more information or a solution, plese let me know.


    Regards, Juan.

  • SyntaxSyntax Posts: 34
    via Email
    OC 3.1.4 on Windows Server 2008 R2 here with lower RAM and CPU than your. Founded memory leak in log file too but OC is rarely crash here.

    However I also implemented kind of Tomcat service monitoring tool on our OC servers, if Tomcat service is downed it will automatically reboot the server and send email notification to me (tool allows me to configure to try to start Tomcat, but I think reboot server would be better as Tomcat service already downed anyway). We have to schedule to apply new Windows updates on monthly basis and reboot is needed, that's may be why the servers are rarely crash by memory leak here.

    Best regards,
  • juan.debonisjuan.debonis Posts: 36
    Thank you Montri, it seems we have a similar context here regarding updates/shutdown cycle. Is there an official bug on these? as it seems that the issue was reported in lots of forums discussion (directly or indirectly). If this is an official bug, we will have to build our path to the upgrade. Thanks again for the information. Best regards, Juan.
This discussion has been closed.