LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

access database memory leak on cRIO 9082

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

0 Kudos
Message 1 of 10
(4,291 Views)

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

Andrew T.
"His job is to shed light, and not to master" - Robert Hunter
0 Kudos
Message 2 of 10
(4,251 Views)

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

0 Kudos
Message 3 of 10
(4,233 Views)
I have not experienced any memory leaks with Jet databases. There are a couple possibilities.

1. There could be something weird going on with the DCT. Can't say for sure as I don't use it -- too many problems.
2. You could be leaving references open or something in the code you wrote. Are you sure its the database connectivity that is causing the leak?
3. It could be related to accessing a database file on a network drive. Jet was never really intended for that kind of application.

How often are you writing to the database? How much gets written to the database before you crash?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 10
(4,210 Views)

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

0 Kudos
Message 5 of 10
(4,185 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 10
(4,183 Views)

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

0 Kudos
Message 7 of 10
(4,177 Views)
You don't need to have access installed to do anything. Jet is built into Windows, as is the ActiveX interface (called ADO). There are drivers readily available. I have uploaded some to the forum and they are also available through my blog.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 10
(4,171 Views)

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

0 Kudos
Message 9 of 10
(4,165 Views)

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

0 Kudos
Message 10 of 10
(4,159 Views)