We just went through this the other day. You want to change # define SQLITE_DEFAULT_CACHE_SIZE 2000 To something smaller since you don't apparently need the cache space. It will only grow to about 3Meg on a 32-bit system apparently. Try making it 10 or less and you should see your process stop growing fairly quickly.
Michael D. Black Senior Scientist Northrop Grumman Mission Systems ________________________________ From: [email protected] on behalf of Radcon Entec Sent: Tue 4/27/2010 2:17 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Hypothetical memory consumption question Pavel, Thank you for your reply. Does data get cached even though I am never executing a select statement? Here's the real world problem: I am trying to write a service that updates 124 simple SQLite databases every minute. The service is written in C#, using Visual Studio 2008 and the SQLite ADO.Net Provider 2.0 library from PHX Software. The databases are identical in structure. There are six tables, of which five are very small. Those tables are the only ones that are ever read, and they're only read once, when the service starts up. The sixth table contains three columns. It is never read. Every minute, one row is added to that table. The service constantly increases its memory consumption. Because this is a service, unbounded memory growth is not acceptable. I have commented out the call to the SQLiteCommand.ExecuteNonQuery() method. In that case, the service's memory footprint is constant. Therefore, the problem is either in the provider or in SQLite itself. I am sure that SQLite has been used many times in Windows services and other persistent applications. What is the preferred technique for avoiding this unbounded memory growth? Do I have to close my databases at the end of my loop and then reopen them at the start of the next loop? Thanks again to you and to all who are able to advise me. RobR _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

