Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Joanne Pham
he shared cache mode or not. Thanks, JP - Original Message From: D. Richard Hipp <[EMAIL PROTECTED]> To: General Discussion of SQLite Database Sent: Tuesday, June 10, 2008 7:30:09 AM Subject: Re: [sqlite] Database locked error, while deleting On Jun 10, 2008, at 10:18 AM,

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 > datab

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 thre

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 SQ

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Mihai Limbasan
Sabyasachi Ruj wrote: Hi, Hello there! 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

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread D. Richard Hipp
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 two threads:- > Thread1: Is deleting 7,00, 000 rows from the table. > Thread2: Is doing SELECT on the same table. > > Now the problem is sometim

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 a

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 ro

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
I used the fuser and lsof commands and found out that no other process is accessing the database file. So it seems that the assumption of another process accessing the file was wrong. Though the problem still remains unsolved. Thanks Ritesh On Tue, 2006-01-31 at 18:02, Christian Smith wrote: >

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 a

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 ge

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 ma

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 se

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 co

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 PROTECT

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