Re[2]: [PATCH] Sqlite DB Pool

Thomas Göttgens <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Five Miles Out Network
Message-ID <[email protected]>
Hello Alejandro,

just out of curiousity, why do we bother with SQLITE anyway? It's
clearly designed for light usage, especially within web applications,
mostly db ready, maybe a few writes.

This can for sure not sustain even light usage from kannel. Sqlite is
essentially a file database like dbase with an sql frontend.

Thursday, November 20, 2008, 2:40:33 PM, you wrote:

AG> Alex,

AG> Sqlite makes a lock on the _whole DB file_ each time it access it.  
AG> That means that if an external application is doing an INSERT on  
AG> send_sms, it will lock the WHOLE FILE, so sqlbox won't get a LOCK to  
AG> DELETE on send_sms nor to INSERT on sent_sms.

AG> If the DB is to sustain moderate load, the default won't cut it. I've
AG> experienced the error when trying to enqueue messages from Sqlite's  
AG> command line utility while running sqlbox. I'm talking about sending a
AG> _single_ message on an idle sqlbox process.

AG> Using the default "busy_timeout" is too low for most practical uses  
AG> IMHO.

AG> For example, the PHP driver sets it to 60 seconds.

AG> If not allowed to change it on the DBPool, it should be set to some  
AG> more realistic value at least, or maybe even set a default and allow  
AG> the client to change it (I can modify the patch to accomodate either  
AG> case of course).

-- 
Best regards,
 Thomas                            mailto:[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.