trisol Posted February 3, 2009 Share Posted February 3, 2009 I have issues with DAQ 5.79A crashing after a few days of run-time. Two things we noticed so far: 1) I noticed that the memory usage continuously increased until DAQ crashes. During investigation we found that when you start DAQ factory it takes x-amount of memory (i.e. 40,000K) when you minimise DAQ (windows standard minimise button on title bar) the memory drops dramatically (i.e.10,000K). When restoring DAQ it raises again but only to about half of the initial (i.e. 20,000K) When Starting DAQ from a shortcut directly into the document it takes a far larger amount of memory again (i.e. 100,000K). Again with minimise and restore it takes anywhere between 25,000K and 45,000K. We replicated this with various sizes of DAQ documents. The memory used is always far lower after a minimise/restore and stays lower (at least for the period of testing: max a few hrs) Now our application runs onboard mobile mining machinery and has typically no user interaction unless with remote takeover for analysis or debug reasons which could be hours or months apart. Is there anybody that can explain this behaviour and how we could keep the memory low? 2) One of the reasons (not sure yet if the only reason) the memory usage increased seemed to be because we opened an ODBC (SQL) every 30seconds with the same line of code: Database = db.OpenEx("DSN=ODBCName;UID=User;PWD=password") This was done for beginners reasons not trusting the database handle/connection to remain open and stable for ever and a day. Instead expecting that re-opening with the same line it would overwrite the already established connection/handle etc. We are now catching "O...." type errors and from there closing and opening the connection. This seemed to have improved the memory usage (we will see in a few days). Why would opening without prior closing of the database connection cause the memory to increase to the death? I would also appreciate any tips for how to best handle ODBC connection to SQL with minimal memory usage. Thank You in advance. Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.