OPC Client Memory Leak

Memory usage grows when my instance of ScadaBR 1.0 is working. Program can’t work normally more than 6 hours. 
With VisualVM heap dump analysis I‘ve found an element with raising size. 
It is mapScada ArrayList in br.org.scadabr.OPCUtils, which stores current and previous DataPoint values. 
 
To prevent mapScada growing, I've added clear() in RealOPCMaster.java:
 
public void doPoll() throws Exception {
    getOpcUtils().getMapScada().clear(); // To prevent mapScada growing on every OPC read
    getOpcUtils().readOPCItemsMap(getNameOPCItems());
}
 
After that memory usage is always less than 250 MB. Does anybody know better solution for this issue? 
Environment: Windows XP, JRE 1.6, Tomcat 6, MySQL, JVM maximum memory pool  = 750 MB.
 

Hi, I have the same problem, my environment is also W XP, JRE1.6, tomcat 6, would you like to tell me how to fix it in the same way as you have done?.

Thanks a lot!

Can you compile the source with added line, as I write above? Or you need already compiled opc-driver.jar?

Thanks a lot for your fast answer. I don’t have the skills to do a success compilation, so I would prefer the jar file to replace the old one.

I have being around this problem several years since I have the OPC interface working. I have even considered to change the software. I have not done so far it because I really like this one. if you can send it to me, I will appreciate.

Thanks in advance,

Try to download from this https://www.dropbox.com/s/ougb4kw394o6oib/opc-driver.jar?dl=0
or this http://www.fileconvoy.com/dfl.php?id=geaa36b95863e80641000008485dba26191a9178970

THANKS A LOT!. I drop it in the java directory and works wonderfull. I am very gratefull to you.

Share opc-driver.jar again, please.

opc-driver.jar you can download from here http://ate.org.ua/wp-content/uploads/2018/01/opc-driver.jar_.zip

Thanks a lot for your fast answer!

Share opc-driver.jar again, please.

You can try again this link http://ate.org.ua/wp-content/uploads/2018/01/opc-driver.jar_.zip

tank you! Sir

If Problem With OPC DA Access Denied 0x80007005

this Solution:

apply the following patch to the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System create or modify 32-bit DWORD: LocalAccountTokenFilterPolicy set the value to: 1

You can refer https://answers.microsoft.com/en-us/windows/forum/windows_7-security/getting-access-is-denied-when-accessing-windows-7/23369f35-bc45-4147-9c3e-74a47d530757