Re: [pysqlite] Erratic behavior under high loads, with APSW code sample
"Frank McIngvale" <[email protected]> Mon, 30 Jun 2008 14:24:30 -0500
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jun 30, 2008 at 1:51 PM, Adrian Klaver <[email protected]> wrote: > > -------------- Original message ---------------------- > From: "Frank McIngvale" <[email protected]> > > > > > > This is vs. APSW, though. It doesn't have a .commit() and it defaults (my > > understanding) to the pysqlite equivalent of 'isolation_level=None', so > > SQLite is doing an auto-transaction for each INSERT (in my example). I > > definitely am getting data written, just not the whole amount (under > POSIX; > > Windows is fine). > > > > I can post a pysqlite equivalent sample if that would help. I suspect the > > problem lies in SQLite itself, but I wanted to see first if anyone here > > could run & replicate the issue on a non-Windows box. > > > > frank > > > > If it helps from: > http://www.sqlite.org/cvstrac/wiki?p=MultiThreading > > SQLite multithreading settings > The setting named THREADSAFE turns multithreading on or off. It's turned on > by default in the precompiled Windows binaries and it's off by default in > the precompiled Linux binaries. Under Linux, Mac OS X and other Unix > systems, you'll have to set it manually. If you're using Mac OS X's Project > Builder, you can easily turn on multithreading by adding -DTHREADSAFE=1 ... OK, thanks for the link. I dug into this and it looks like APSW is doing the right thing -- from setup.py: # We always want threadsafe define_macros.append( ('SQLITE_THREADSAFE', '1') ) So the mystery continues ... am going to try the minimal sample with pysqlite and see if the same thing happens. thanks, frank > > -- > Adrian Klaver > [email protected] > > > > _______________________________________________ list-pysqlite mailing list list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite