Paul, On Fri, 2008-08-22 at 12:03 +0200, Paul J Stevens wrote:
> > Finally, it is also possible to use Unix file-locking operations to lock > > the database file on open (meaning lockf() or something like that), > > rather than relying on SQLite to do this. I went ahead and coded this > > up, although I haven't tested it. It's a bit of a hack, but I think it > > should work. See the patch at the end. > > Why on earth won't you simple rely on sqlite to do it's own locking?? Yes, if that works then one should rely on it. But I did find a lot of error messages related to lock contention, and these were pretty much my only clue as to why mail was getting truncated: Aug 20 15:49:00 madras dbmail/smtp[10935]: Error:[sql] dbsqlite.c,db_query(+334): sqlite3_get_table failed: database is locked Aug 20 15:49:01 madras dbmail/smtp[10935]: Error:[db] db.c,db_insert_physmessage_with_internal_date(+1137): insertion of physmessage failed Aug 20 15:49:01 madras dbmail/smtp[10935]: Error:[delivery] pipe.c,insert_messages(+545): failed to store temporary message. Aug 20 15:49:01 madras dbmail/smtp[10935]: Error:[smtp] main.c,main(+343): insert_messages failed It is quite possible the truncated messages have nothing to do with locking. It is quite possible that is was some unrelated thing on my system. But, my task was not to debug the SQLite setup, but rather to make the mail work, so I switched to PostgreSQL to see if it would help and the problems went away. I just thought maybe someone else could avoid these problems in the future. :) Cheers, -- Shane _______________________________________________ DBmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
