Hi Simon,

Thank you for your reply. I tired your solution, but I still got the same error 
message, even when I set PRAGMA busy_timeout = 10000.




------------------ ???? ------------------
???: "Simon Slavin";<slavins at bigfraud.org>;
????: 2016?5?8?(???) ??11:22
???: "SQLite mailing list"<sqlite-users at mailinglists.sqlite.org>; 

??: Re: [sqlite] database is locked when using SQLite3 and MPI togenerate 
different databases




On 8 May 2016, at 3:14am, just_rookie <925345468 at qq.com> wrote:

> But when I ran the program in Linux, I got an error message from 
> sqlite3_exec() that ?database is locked?.

You have not set a timeout, so SQLite is quitting as soon as it is told that 
another thread/process has the database locked.  Set a timeout by executing

PRAGMA busy_timeout = 5000

immediately after opening your connection to the database.

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

Reply via email to