Memory leakage

  • Anonymous - 2012-08-08


    I have a problem with OPC Gateway Service and his memory. This process increases his memory out of control, I think. Memory increases 10 MB in 2 hours.

    My configuration is:
    - OPC Gateway Service (.exe) runs on Windows XP
    - Matrikon OPC Server
    - OPC client is on a Linux embbeded.

    My code simplified is:

    opc = OpenOPC.open_client(IPServer)
    opc.connect(IDServer, IPServer)
    while True: # infinite loop
    data =
    time.sleep(10) # Sleep 10 seconds

    I tried open and close the communication with the server every time but the memory increases too.

    Can anyone offer any help on this? Thanks.

  • SpinelliCreations

    It's a known issue - the workaround is to close the openopc gateway service (stop it, then restart it) on a scheduled basis (such as once per day, or once per week).  How often you do so depends on how much traffic you're running - the server I maintain resets once per day serving a medium sized industrial facility, although I could get away with once every 3 days.

  • Anonymous - 2012-08-19

    I have the same problem. if its a known issue why its not listed in open items. Also why its showing me as deleted in the bug list.Is this planned to be fixed?

  • SpinelliCreations

    It is not listed in Open Items / bug list / etc… nor is it planned to be fixed.

    The reason is because it is not a problem with OpenOPC - it is actually an issue believed to be with the PyWIN package.  One of OpenOPC's dependancies is Python for Windows Extensions (PyWIN32) - which passes indexed items to the Windows backbone with indexes starting at "1".  Python uses indexes starting at "0".  Somewhere along the line, PyWIN  has an issue.  Both Barry and I have tried getting ahold of Mark Hammond (PyWIN32 author) for help with this, however Barry didn't have any luck.  While Mark did tell me he'd be willing to lend a hand - I do not have time to set up a test platform for him to reproduce the issue on.

    Maybe someday this will get addressed.  Until then, it's a known issue.

  • Difool

    Difool - 2013-10-01

    Hi guys,

    I have a similar issue but I'm not using the OPC Gateway Service : I use DCOM mode.
    My code (running in a PyQT Thread) simplified is :

    while True:
    client = OpenOPC.client()
    self.dataReady.emit( + "*")))

    And it consume about 1Mo per second.

    Does it a known bug or is that something I'm doing wrong ?

    Last edit: Difool 2013-10-01

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks