On 12 Jan 2012, at 12:32pm, Hajo Locke wrote:

> Hello,
> 
>> Using the shell tool is itself a very 'expensive' way to manipulate a SQLite 
>> database.  If you're concerned about concurrent users, write proper software 
>> directly in perl to do it, rather than using perl to create a shell and 
>> execute the shell tool in it.
>> 
>> http://mailliststock.wordpress.com/2007/03/01/sqlite-examples-with-bash-perl-and-python/
> 
> hmm, this is true
> in this situation i cannot use any dbi or something.
> just basic-perl and sqlite binary...

You seem to have a situation where you have many concurrent users, each doing 
SELECT and none updating the database file.  You report you're getting this 
error

> "Error: database is locked"

You can use the

.timeout

shell command rather than writing a loop in perl.  I'm happy your system mostly 
works so far, but I would still feel nervous using anything which depended on 
frequent use of shell execution in a server.  Starting and stopping shell 
sessions is extremely expensive in terms of processing time and memory.  I 
recommend you look into either writing proper perl code, or making use of a 
language which can use the proper SQLite API.

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

Reply via email to