[sqlite] Database locked error with only one process?

2015-12-30 Thread Jason H
I read around, and it seems that the consensus is it should only be locked during a multi-thread/multi-process update. However I encountered the error in a python script (single proc/single thread) that was the only reader/writer to the database. It seems that I forgot to con.commit() in a loop

[sqlite] Database locked error with only one process?

2015-12-30 Thread Simon Slavin
On 30 Dec 2015, at 5:12pm, Jason H wrote: > I read around, and it seems that the consensus is it should only be locked > during a multi-thread/multi-process update. Nope. The database is locked any time a transaction is under way [1]. Your program cannot know if another process is going to

[sqlite] Database Locked Error

2013-07-29 Thread Ajazur Rahaman
Dear All, Can you please help me in solving below error.When I am compiling sqlite 3.6.12 on UCLINUX. Error : database locked or Can you please assist me in executing sqlite 3.6.12 on UCLINUX. -- Thanks & Regards, Mohammed Aijas +91-9642933393 ___

[sqlite] 'database locked' error

2009-08-13 Thread Allassopraise
Hello, I would like to pass cookies back and forth between a search script I have written that runs on the local system, and javascript pages displaying the forms and results in Firefox. I'll forego all the gory details here, it is working pretty well, but being able to pass cookies back and

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread D. Richard Hipp
On Jun 10, 2008, at 10:18 AM, Shailesh Birari wrote: > Richard, > Just to go one step ahead, If there are independent connections, do > you > mean that there can exist multiple transactions at the same time? I > think not since the first transaction (write) will exclusively lock > the >

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Shailesh Birari
abase > Subject: Re: [sqlite] Database locked error, while deleting > > > On Jun 10, 2008, at 7:36 AM, Sabyasachi Ruj wrote: > > > Hi, > > > > I have a very big table with around 40,00, 000 rows. 4 columns. 220 > > MB. > > > > Now, I have tw

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Sabyasachi Ruj
Our PRAGMA cache_size = 4000. Is there any recommended way to calculate the cache size needed? On Tue, Jun 10, 2008 at 5:29 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > "Sabyasachi Ruj" <[EMAIL PROTECTED]> > wrote in message > news:[EMAIL PROTECTED]<[EMAIL PROTECTED]> > > Now, I have two

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Sabyasachi Ruj
We are using two different connections to sqlite for these two different threads. So, we are not sharing the connection in SELECT and the DELETE thread. On Tue, Jun 10, 2008 at 5:28 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote: > > On Jun 10, 2008, at 7:36 AM, Sabyasachi Ruj wrote: > > > Hi, >

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Igor Tandetnik
"Sabyasachi Ruj" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Now, I have two threads:- > Thread1: Is deleting 7,00, 000 rows from the table. > Thread2: Is doing SELECT on the same table. > > Now the problem is sometimes the sqlite3_prepare for the SELECT query > is failing with

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread D. Richard Hipp
On Jun 10, 2008, at 7:50 AM, Alex Katebi wrote: > There can only be one prepare per table at a time. The first prepare > has to > be finalized before another one. Table is locked by the first > prepare until > finalized. > Actually, there is no limit on the number of prepared statements on

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Alex Katebi
There can only be one prepare per table at a time. The first prepare has to be finalized before another one. Table is locked by the first prepare until finalized. On Tue, Jun 10, 2008 at 7:36 AM, Sabyasachi Ruj <[EMAIL PROTECTED]> wrote: > Hi, > > I have a very big table with around 40,00, 000

[sqlite] Database locked error, while deleting

2008-06-10 Thread Sabyasachi Ruj
Hi, I have a very big table with around 40,00, 000 rows. 4 columns. 220 MB. Now, I have two threads:- Thread1: Is deleting 7,00, 000 rows from the table. Thread2: Is doing SELECT on the same table. Now the problem is sometimes the sqlite3_prepare for the SELECT query is failing with SQLITE_BUSY

[sqlite] Database Locked Error... problem still persists

2006-02-01 Thread Ritesh Kapoor
Hi, Background Info - 1. Using Linux kernel v2.4.21 on both machines. 2. Scenario in which this problem occurs - when I rlogin/rsh to another machine and then run the app calls to sqlite3_open() work successfully calls to sqlite3_exec() return 'database is locked' error message 3. This

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
I've tried to copy/paste and simplify the code. Please assume that the sql query on line #19 is correct, its actually longer so i truncated it. getDB() returns _db. I checked the value of _db after the sqlite3_open() fn call its a valid handle. I'm trying to understand fuser and lsof commands

Re: [sqlite] Database Locked Error

2006-01-31 Thread Christian Smith
On Tue, 31 Jan 2006, Ritesh Kapoor wrote: >Regarding the configuration of NFS - >I have two machines with NFS on them. >- if i run the app on machine 1 it works properly >- now when i run the app on machine 2 it works properly > >But if I login to machine 2 from machine 1 and then run the app I

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
Please ommit line #18 from the sequence of statements and then reply. Thanks Ritesh On Tue, 2006-01-31 at 16:42, Ritesh Kapoor wrote: > Regarding the configuration of NFS - > I have two machines with NFS on them. > - if i run the app on machine 1 it works properly > - now when i run the app on

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
Regarding the configuration of NFS - I have two machines with NFS on them. - if i run the app on machine 1 it works properly - now when i run the app on machine 2 it works properly But if I login to machine 2 from machine 1 and then run the app I get the 'database is locked' error message. The

Re: [sqlite] Database Locked Error

2006-01-30 Thread drh
Ritesh Kapoor <[EMAIL PROTECTED]> wrote: > Yes. > My machine has NFS and the machines I log onto also have NFS. But if > this is the problem then why dosen't it appear on my machine when I run > the app. Perhaps you are using a local filesystem when you run on your machine. Or perhaps NFS is

Re: [sqlite] Database Locked Error

2006-01-30 Thread Ritesh Kapoor
Yes. My machine has NFS and the machines I log onto also have NFS. But if this is the problem then why dosen't it appear on my machine when I run the app. Is there a workaround for this? without having to change the file system from NFS. Thanks, Ritesh On Mon, 2006-01-30 at 18:12, [EMAIL

Re: [sqlite] Database Locked Error

2006-01-30 Thread drh
Ritesh Kapoor <[EMAIL PROTECTED]> wrote: > > Can anyone suggest what the problem is with sqlite when running apps on > different machines. This happens sometimes when NFS us misconfigured so that it does not support fcntl() file locks. The lock requests always fail, hence SQLite always returns