Sounds like something changed in Qt 5.1.1 so that it is holding open a read
transaction.  The first process acquires the read transaction, which
permits other processes to read but prevents anybody else from writing.  I
have no idea why Qt would do this, though.

You can change to WAL mode, which will allow other processes to write while
the original process holds the read transaction open.  But with the read
transaction active, you'll never be able to checkpoint and so the WAL file
will grow without bound.  Things will appear to work at first, but you will
eventual run into performance problems with a huge WAL file.

I think your goal should be to figure out why Qt 5.1.1 is holding open the
read transaction.


On Tue, Oct 29, 2013 at 8:52 AM, Martin <free...@rakor-net.de> wrote:

> Hi there!
>
> I have a program written in Qt and using the SQLite-drivers shipped with
> Qt.
> AFAIK those are the original SQLite-drivers. The program is running on
> Windows7.
>
> Originally the program was written using Qt4.8 (which came with SQLite
> 3.7.14.1). The program runs parallel on multiple machines all sharing the
> same
> SQLite-Database-file. The programs have 99% reading access (SELECT). Some
> times
> there will be some data written/changed. All clients may change the data.
> Until now this worked without issues.
>
> Now I am porting the program from Qt 4.8 to Qt 5.1.1 (shipping SQLite
> 3.7.17)
> and am running in trouble with parallel access to the database-file. The
> first
> program accessing the database can work normally with the database. But all
> programs starting
> later can only access the database for reading. If one of them wants to
> write
> data in the database I get a "database-locked-error".
>
> Can you tell me if I am doing something wrong, or if there is a good
> reason for
> this habbit?
>
> All the programs connect to database at startup and close the
> databaseconnection
> on program close.
>
> Thanks for your help
>
> Martin
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to