On 15 Oct 2010, at 8:11pm, Simon wrote:

> The program is meant to loop forever, grab information from the
> internet and store it in the database.  The error happens after 12-24
> hours of execution.  The database file is opened at the beginning of
> execution and is never closed (it would if the loop was not
> while(1){...}).

Does your application have a leak of some kind ?  Does it get slower, or 
request more memory, or open more file handle, the longer you leave it running 
?  Use your OS's utilities to monitor it and see if it looks different in the 
12th hour to the way it looks in the 1st hour.

> This transaction is done every 60 seconds and there is only one thread
> working.  The transaction contains 1 or 2 dozen INSERTs only...  And
> my program has no memory leaks, the system has been running very
> stably for 96 days so far...

Hmm.  Just for testing, make it go crazy and do things ten times as often or 
insert ten copies of every record.  Does the error happen at the same time, or 
ten times sooner ?

> Should I also close the database
> after doing my transaction and re-open it every iteration of my loop?

Try it.  If it fixes your problem then you have a serious bug, either in your 
code or in one of the support libraries you're using (or possibly your OS !).

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

Reply via email to