Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Sherief N. Farouk
> Hi - it only happens on Windows systems that are using U3 USB keys.
> None of
> the queries are intensive - they are pretty simple and shouldn't take
> longer
> than a few milliseconds.
> 
> On harddisks it *always* works. Never had an issue there.
> 

Like Teg said, you can use procmon in addition to a useful utility by
sysinternals called "handle" - tells you what processes has open handles.
"handle X:" will list open handles to files on drive X.

I want to blame the awful U3 software though.

- Sherief

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


Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Teg
Hello Dave,

Friday, April 3, 2009, 12:16:37 PM, you wrote:

DB> Hi - it only happens on Windows systems that are using U3 USB keys. None of
DB> the queries are intensive - they are pretty simple and shouldn't take longer
DB> than a few milliseconds.

DB> On harddisks it *always* works. Never had an issue there.

DB> On Fri, Apr 3, 2009 at 5:15 AM, Emil Obermayr  wrote:

>> On Thu, Apr 02, 2009 at 08:20:38PM -0700, Dave Brown wrote:
>> > Our software often runs into problems when run on USB keys. Specifically,
>> > calls to sqlite to read/write to the database hang infinitely, or return
>>
>> Does it work on harddisk?
>>
>> I can tell RO-access works nicely on Windows XP.
>>
>> Do you have those timeouts only with some request; or does it happen
>> even with very simple ones like select * from smalltable; ?
>>
>> I can tell sqlite takes a very long time with unbracketed joins. The
>> performance is way better with brackets around each join.
>>
>> Do you have more than one process connected to the file at a time? Maybe
>> they are blocking each other.
>>  ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
DB> ___
DB> sqlite-users mailing list
DB> sqlite-users@sqlite.org
DB> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Install and run "ProcMon" on the system and you can watch every write
and read to the stick. I use it regularly to trouble-shoot weird disk
issues. It's available from Microsoft.

-- 
Best regards,
 Tegmailto:t...@djii.com

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


Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Dave Brown
Hi - it only happens on Windows systems that are using U3 USB keys. None of
the queries are intensive - they are pretty simple and shouldn't take longer
than a few milliseconds.

On harddisks it *always* works. Never had an issue there.

On Fri, Apr 3, 2009 at 5:15 AM, Emil Obermayr  wrote:

> On Thu, Apr 02, 2009 at 08:20:38PM -0700, Dave Brown wrote:
> > Our software often runs into problems when run on USB keys. Specifically,
> > calls to sqlite to read/write to the database hang infinitely, or return
>
> Does it work on harddisk?
>
> I can tell RO-access works nicely on Windows XP.
>
> Do you have those timeouts only with some request; or does it happen
> even with very simple ones like select * from smalltable; ?
>
> I can tell sqlite takes a very long time with unbracketed joins. The
> performance is way better with brackets around each join.
>
> Do you have more than one process connected to the file at a time? Maybe
> they are blocking each other.
>  ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Emil Obermayr
On Thu, Apr 02, 2009 at 08:20:38PM -0700, Dave Brown wrote:
> Our software often runs into problems when run on USB keys. Specifically,
> calls to sqlite to read/write to the database hang infinitely, or return

Does it work on harddisk?

I can tell RO-access works nicely on Windows XP.

Do you have those timeouts only with some request; or does it happen
even with very simple ones like select * from smalltable; ?

I can tell sqlite takes a very long time with unbracketed joins. The
performance is way better with brackets around each join.

Do you have more than one process connected to the file at a time? Maybe
they are blocking each other.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Jean-Denis Muys
On 4/3/09 5:20 AM, "Dave Brown"  wrote:

> Our software often runs into problems when run on USB keys. Specifically,
> calls to sqlite to read/write to the database hang infinitely, or return
> SQLITE_BUSY after even 10 seconds of waiting. The problem seems to be that
> the database file gets locked and remains locked, presumably by some problem
> with the usb key filesystem in conjunction with sqlite.  Has anyone seen
> this before, or know of a workaround?
> 

I definitely haven't seen that, under MacOS X.

I would assume this kind of issue to be highly OS and file-system dependent.
You might want to tell us about your environment.

MacOS X is a Unix OS, where external volumes such as USB drives are mounted
within the / hierarchy (ditto for Linux). From SQLite point of view, there
is really no way to tell whether the database is stored on a USB drive or
elsewhere. But File System limitations remain.

Most likely but not necessarilly (depending on its capacity), your USB thumb
drives uses a FAT32 file system. You might want to try and reformat it to a
more modern file system, such as HFS or NTFS. It might help. Or not.

Jean-Denis

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


[sqlite] Problems with file locks on USB keys

2009-04-03 Thread Dave Brown
Our software often runs into problems when run on USB keys. Specifically,
calls to sqlite to read/write to the database hang infinitely, or return
SQLITE_BUSY after even 10 seconds of waiting. The problem seems to be that
the database file gets locked and remains locked, presumably by some problem
with the usb key filesystem in conjunction with sqlite.  Has anyone seen
this before, or know of a workaround?

Thanks!
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users