On Sat, Sep 01, 2012 at 11:56:33PM -0700, J Decker scratched on the wall:
> On Sat, Sep 1, 2012 at 8:24 PM, Jay A. Kreibich <j...@kreibi.ch> wrote:
> > On Sat, Sep 01, 2012 at 07:37:04PM -0700, J Decker scratched on the wall:
> >> On Sat, Sep 1, 2012 at 7:32 PM, Simon Slavin <slav...@bigfraud.org> wrote:
> >> > On 2 Sep 2012, at 3:13am, shuif...@mail.ustc.edu.cn wrote:
> >
> >> >> 2??how many user connections the sqlite can handler
> >> >
> >> > There is no limit in SQLite for connections.
> >>
> >> It is not advised to have multiple processes connect to same file. ..
> >> but in-process probably no limit of connections.
> >
> >   I'm not sure where this idea comes from, as it is perfectly
> >   acceptable to have multiple processes accessing the same database
> >   file.
> >
> >   SQLite makes very little distinction between different connections
> >   from the same process and different connections from different
> >   processes, so there isn't any significant limit that applies to one
> >   situation that doesn't apply to the other.
> >
> >   Concurrency is always an issue, and you don't want hundreds of
> >   connections banging on the same file, but that's true no matter if
> >   the connections come from the same process or not.

> the point would be 'and not have concurrancy issues that I'd have to
> solve myself...'

  SQLite uses file locks to control concurrent access between all
  the connections.  This is true if the connections come from the
  same process or different processes.  Accessing the same SQLite
  file from multiple connections/threads/processes is perfectly safe.

  About the only time you run into concurrent access issues is if you
  attempt to access an SQLite database on a network-based file system.
  Most network-based file systems don't do locks correctly (and
  definitely don't do distributed locks correctly), so there can be
  issues.  This case is well known and well documented and can be
  considered a bug in the network filesystem implementations.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to