04-07-2015 08:57 AM
Hello All,
I recently developed an applicaiton to run on a windows 7 based cRIO that has been giving me some trouble. the purpose of the application is to continously aquire and log data to an access database located on another computer located on the network (i do not have any form of office installed on the cRIO) but i have ran into issues with memory consumption. After about 3 days of running on the cRIO the applicaiton will consume all of the memory resulting in a crash. This memory consumption only occurs on the cRIO, i had ran it for about a month as an executable on my develpment PC without any issues, i have also used the performance and memory profiler to ensure that my code was not consuming the memory.
I am connecting to the database using a UDL and the database connectivity toolkit and i have tried both the JET 4.0 ole db provider (i used .mdb files here) and the Office 12.0 Access Database Engine OLE DB Povider. I have also tried the associated Hot Fixes from microsoft without any luck (article ID: 248014)
i know im not the first to post on this topic but i have not been able to resolve this and im hoping for some insight into what could possibly be the issue.
Thanks,
Frank
04-08-2015 04:08 PM
Hi ftcaruso,
I'm curious to know how you ran your RT application on your regular pc? Did the RT application just not have any RT-specific functions? Are you using timed loops?
Regards,
Andrew
04-09-2015 08:43 AM
Hi Andrew,
The 9082 Chasis has an option for either a RT os or Windows Based os when you order it,
im using the windows 7 based chasis so that i am able to log to an access database.
Thanks,
Frank
04-09-2015 07:41 PM
04-10-2015 08:28 AM
Hi Mike,
Thanks for the reply,
I will double check all of my refrences but when i run the application on my developement computer i havent experienced any memeory leaks, it only occurs when the code is run on the cRIO which leads me to belive it is related to the JET or ACE database engines. (i have Access 2013 installed on my development computer but not on the cRIO so i am trying to determine if this causes some weird issue) I also placed the database on the cRIO to see if the memory leak occured while not writing to a database over a network and it still leaked.
My code reads roughly 120 sensors from 30 or so machines and writes data to the database every 10 seconds.
Thanks,
Frank
04-10-2015 08:30 AM
Are you opening and closing the database connection a lot? If so, it will allocate a few bytes each time leading to slowly growing memory footprint.
/Y
04-10-2015 08:44 AM
Nope,
Just one connection to the database that stay open, currently i have it setup to close and reopen the referrence every 24 hours but that has not helped.
I have been playing around with Activex controls for getting the data into the database so im thinking of bypassing the database connectivity toolkit labview provides tand try that route (granted i will need ms access on the crio)
Thanks,
Frank
04-10-2015 09:01 AM
04-10-2015 09:25 AM
Hi Mike,
I was using activex to open the database on my development pc which allows me to execute a query directly through access, I will look into your method.
Thanks!
-Frank
04-10-2015 09:42 AM
For all others who stumble upon this topic,
http://www.notatamelion.com/category/database/
This is definately a good read for communicating with databases without using labviews database connectivity package
Thanks,
Frank