Hi guys,
  first time I see this, not much docs on the topic, or I couldn't
find much on this one...

  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){...}).  The bug happens during my own "query" function,
meaning one of the prepare, step, finalize functions cause this (I
will try to fine grain my log to help on this).  The query is made of
text only, no parameters are bound, the query's text is perfectly sane
and the error happens on one INSERT of a transaction (ie, not at begin
or commit transaction).

  I'm not sure how to interpret this as the DB has been opened all
along.  It is the only process that is accessing the database file.
The file itself is in a writable directory, the file and any other
(-journal, etc) are writable, plenty of disk space, plenty of inodes
left, no quotas, plenty of ram available, the /tmp has disk space
available too...  And I can't reproduce it, except with lots of
patience...  also the query contains sane data, within a transaction.
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...

Running on Linux (a Linode, actually a virtual private server), distro
is Gentoo, kernel is 2.6.35-rc3 with aufs2 compiled in but not used,
filesystem is ext3 (it has journaling and has options
"barrier=0,data=writeback").  The database path is relative to the
process (ie:  "someDir/theDBfile") and has no substitution of any
sort.  The file is local not networked.  The DB itself is setup with
all default options.  Using sqlite-3.6.23.1

  As I said, I will fine-grain my debug log and I will try to
reinforce this query function...  Should I also close the database
after doing my transaction and re-open it every iteration of my loop?
Or perhaps close and reopen every hour or so?  I don't think so, but
let me know what you think...

  If anyone has had experience like this, or knows something, or has
any idea at all, I'd be very happy to hear about it!
  Oh and if you guys need me to include some more technical info, let
me know what you need (and maybe how I can get it just in case I don't
know)...

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

Reply via email to