LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory leak when using database connectivity toolset and ODBC driver for MySQL

The "DB Tools Close Connection VI" does not free all the memory used when "DB Tools Open Connection VI" connects to "MySQL ODBC Driver 3.51".

I have made a small program that only opens and close the connection that I run continously and it's slowly eating all my memory. No error is given from any of the VI's. (I'm using the "Simple Error Handler VI" to check for errors.)

I've also tried different options in the DSN configuration without any results.
Download All
0 Kudos
Message 1 of 8
(4,922 Views)
You may want to report this to NI if you think there is some sort of memory lead in the VIs. I'm sure it is something they would like to hear about.
J.R. Allen
0 Kudos
Message 2 of 8
(4,922 Views)
I've seem to have found a solution (but not the answer) to my own problem.

I've switched from:
"MySQL Connector/ODBC 3.51, the production-ready version of the driver"
to:
"MySQL Connector/ODBC 2.50 the old production-ready version of the driver"
(Both can be found on their web-site)

My test program showed no memory leaks, and the memory leak in my application looked much smaller.
Still some memory was disappearing.
It looked like all the "DB Toolset Insert Data VI" was also eating some memory. I changed them to "DB Toolset Execute Query VI" with a "DB Toolset Free Object VI" after. And the memory leak seem to have disappeared.
I'll test it overnight again, to see if it truely solved everything.

Magnus
Message 3 of 8
(4,922 Views)
"JRA" wrote in message
news:50650000000500000010F70000-1042324653000@exchange.ni.com...
> You may want to report this to NI if you think there is some sort of
> memory lead in the VIs. I'm sure it is something they would like to
> hear about.

Could you please include the post you have responded to next time? It makes
following the thread much easier.

Thanks.
0 Kudos
Message 4 of 8
(4,922 Views)
The application has run for 2 days, and no memory leak is noticeable, so what I've written above solved my problem at least.

If it's MySQL or LabVIEW that has the problem, I couldn't say.

Magnus
0 Kudos
Message 5 of 8
(4,922 Views)
You've probably solved the problem by now, but just to confirm, there is definitely a memory leak using MySQL ODBC Drivers Versions 3.15.05/3.15.06. I use Version 3.15.04 and that solved the problem. Attached is a setup document that might be of use.
0 Kudos
Message 6 of 8
(4,922 Views)

All,

 

I'm still having this issue (I beleive.) .... 7 years later. I'm using MySQL ODBC 5.1, has anybody had experience or is still experiencing the same problem?

 

Regards,

Ken

0 Kudos
Message 7 of 8
(3,849 Views)

Also,

 

I've duplicated the OPs example: a simple VI that opens and closes a connection. I can say this definately causes a memory leak.

 

Watching the memory:

10:17AM - 19308K

10:19AM - 19432K

10:22AM - 19764K

10:58AM - 22124K

 

Regards,

Ken

0 Kudos
Message 8 of 8
(3,829 Views)