Jump to content

Database Error


Recommended Posts

Hi Guys,

I have a problem with a Labview application. Maybe you guys will have some ideas.

OK, so I have a single LabView application that launches 1 or more dynamic VI's to control production processes. In some cases 30 processes are managed independently. As each process runs, it collects result data. Once the process is finished, this data is written to a mysql database. Each of the 30 processes can connect, write and disconnect from the database indpendently at any time. It is possible therefore that we multiple database connections from this application.

The problem, whilst this runs reliably 90% of the time, occasionally we have an error in that a process can not connect to the database.

The database is MySQL and we are using the NI Database Toolkit. The database is installed on the same PC as the application.

MySQL has been set to support a high number of connections, much more than needed. I logged data from mySQL and this does not show an error when LabView reports that a connection attempt failed. So I am wondering if this is due to a limitation of LabVIEW or of windows.

I have read that there is a limit to the number of tcpip connections that can be opened in 1 second in Windows. BUT, do connections to a local database via odbc still require a tcpip port? And would this fail the connection, or just delay it?

I have started modifying the software to allow a single connection to be opened and this then shared between the various processes to see if this helps. But, even if this solves the problem, I would prefer to understand the problem.

Any thoughts guys would be of interest.

Link to comment

The first thought would be to look at the error number and description, see if it makes sense and do a search to see if others ran into such problems.

I can say that maintaining a single connection is relatively simple (and has some advantage in that it can simplify the code if you design its wrapper as a singleton).

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.