Hi there,

I am playing with the PRAGMA cache_size and it seems to help lots. I will
keep you posted ;-)

Lynton

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Lynton Grice
Sent: 07 December 2010 10:31 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Runtime memory growth concerns

Interesting, seems that for my queue implementation using SQLite in WAL mode
if I keep a "global" connection handle open while the client is using the
queue then the memory grows quickly..but if I open and close the handle on
each SEND, RECEIVE etc then all is fine...

 

Does this sound right?

 

From: Lynton Grice [mailto:lynton.gr...@logosworld.com] 
Sent: 07 December 2010 10:26 PM
To: 'sqlite-users@sqlite.org'
Subject: RE: Runtime memory growth concerns

 

Hi there,

 

Regarding the message I sent earlier...Just a quick update from my side, it
seems when I run the following 

 

sqlite3_step(stmt);

 

The memory grows and does not get released in my specific case even though I
set 

 

sqlite3_finalize(stmt);

 

after it.

 

The moment I comment out that sqlite3_step(stmt); line then all is "normal".

 

Any ideas? Do I need to set some PRAGMA stuff to get the memory better?

 

Thanks

 

Lynton

 

 

From: Lynton Grice [mailto:lynton.gr...@logosworld.com] 
Sent: 07 December 2010 08:27 PM
To: 'sqlite-users@sqlite.org'
Subject: Runtime memory growth concerns

 

Hi there,

 

I am a huge SQLite fan and am very curious as to why the following would
happen.

 

Essentially I have a "queue implementation" using SQLIte in WAL mode and it
is working really well.

 

However, at runtime if I watch the Task Manager in windows as thousands of
messages are sent to it, the memory just grows and grows and grows.

 

The moment I take out the queue stuff in my program the memory is fine.

 

I have the database with the following settings:

 

PRAGMA journal_mode=wal

PRAGMA wal_checkpoint

PRAGMA synchronous=normal

PRAGMA temp_store=memory

 

Is there something I could be doing wrong here? As an example here is some
code that PEEKS a message off the queue:

 

I am using the following sequence when I run queries on the database:

 

sqlite3_prepare_v2

sqlite3_bind_parameter_index

sqlite3_step

sqlite3_finalize

 

If you have any ideas why you think the memory is growing at a rapid rate
please let me know? 

 

Many thanks ;-)

 

Lynton

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to