burt4munger

Possible System Memory Leak, trying to eliminate DAQFactory

Recommended Posts

A windows 10 computer I have running two large DAQFactory programs is crashing in about a week due to memory running out and windows crashing (the bluescreen says)  The only real applications running are two very large DAQFactory programs (and SQL Server which is known to be a memory hog but i don't think it crashes windows).  I suspect the issue is likely something I'm doing, like a db.open without a matching db.close in a fast loop somewhere so I'm already looking for those.  Are there any hints where to look or tools built in that might help with this?  Has anyone seen issues continuously writing large amounts of debug text to the command window? I looked elsewhere in the forum and there was only one pretty dated article dealing with memory issues.

Share this post


Link to post
Share on other sites

If you are opening a database but never closing it, you will leak memory.  It will be a pretty slow leak, but after a week could use up all available memory.  Windows responds to complete loss of memory in weird ways, and a bluescreen is not unheard of.  Personally I don't close my databases.  I open them at startup and just leave them open while DAQFactory is running.  DAQFactory will close it automatically when it shuts down.  File handles often have to be closed to force Windows to clear the write cache, or to allow other applications write access to the file, but databases do not have this issue.  If you are seeing that the database appears to not be updating in another program while DAQFactory is working with it, it may be that the database is transactional and you need to perform a commit on the database.  The SQL command for this varies on the database, but for, say, Firebird, the command is just "Commit".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now