Re: [sqlite] Slow rollback - possible causes?

2011-06-08 Thread Richard Hipp
On Tue, Jun 7, 2011 at 10:03 PM, Eric Sigler wrote: > We haven't watched the WAL continuously, but we have noticed that the > WAL file grows slowly in size over time between application restarts > (around every 2 weeks). Currently, the WAL file for one of our DBs is > around 40MB, we've seen it

Re: [sqlite] Slow rollback - possible causes?

2011-06-08 Thread Richard Hipp
On Tue, Jun 7, 2011 at 9:02 PM, Eric Sigler wrote: > Hello! > > Does anyone know of a reason why we might be seeing SQLite transaction > rollbacks that take between 60 and 240 seconds? (One particularly odd > occurrence was almost 20 minutes long!) This doesn't seem to happen > often, but when

Re: [sqlite] Slow rollback - possible causes?

2011-06-07 Thread Pavel Ivanov
> We're issuing "PRAGMA > wal_checkpoint" to the open DB handle. If you want guaranteed finish of the checkpoint (and thus not growing WAL-file) you need to issue "PRAGMA wal_checkpoint(RESTART)". Pavel On Tue, Jun 7, 2011 at 10:36 PM, Eric Sigler wrote: > So, should the WAL file shrink back

Re: [sqlite] Slow rollback - possible causes?

2011-06-07 Thread Eric Sigler
So, should the WAL file shrink back to 0 then? We're issuing "PRAGMA wal_checkpoint" to the open DB handle. -Eric On Tue, Jun 7, 2011 at 7:06 PM, Pavel Ivanov wrote: >> (Actually, that was another general question we had, should that WAL >> file ever shrink during use?  Why would it grow to tha

Re: [sqlite] Slow rollback - possible causes?

2011-06-07 Thread Pavel Ivanov
> (Actually, that was another general question we had, should that WAL > file ever shrink during use?  Why would it grow to that size at all?) It shrinks, when the full checkpoint is completed successfully. Until then it grows. Pavel On Tue, Jun 7, 2011 at 10:03 PM, Eric Sigler wrote: > We ha

Re: [sqlite] Slow rollback - possible causes?

2011-06-07 Thread Eric Sigler
We haven't watched the WAL continuously, but we have noticed that the WAL file grows slowly in size over time between application restarts (around every 2 weeks). Currently, the WAL file for one of our DBs is around 40MB, we've seen it grow up to 130MB or so. I'll try to catch the WAL size and se

Re: [sqlite] Slow rollback - possible causes?

2011-06-07 Thread Pavel Ivanov
> DB file in WAL mode, checkpointing done every 5 seconds by separate > thread in program Depending on the mode of checkpointing you use it can fail if there are some other reading or writing transactions in progress. And at the time you observe very long rollback actual checkpointing happens beca

Re: [sqlite] Slow rollback - possible causes?

2011-06-07 Thread Simon Slavin
On 8 Jun 2011, at 2:02am, Eric Sigler wrote: > Does anyone know of a reason why we might be seeing SQLite transaction > rollbacks that take between 60 and 240 seconds? My initial thought was a faulty hard disk: bad sectors or a duff controller. Given that you're running inside a VM, it might a

[sqlite] Slow rollback - possible causes?

2011-06-07 Thread Eric Sigler
Hello! Does anyone know of a reason why we might be seeing SQLite transaction rollbacks that take between 60 and 240 seconds?  (One particularly odd occurrence was almost 20 minutes long!)  This doesn't seem to happen often, but when it does it's painful.  During the rollback, the disk is definite