Re: [pysqlite] Erratic behavior under high loads, with APSW code sample
Roger Binns <[email protected]> Mon, 30 Jun 2008 19:02:32 -0700
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Frank McIngvale wrote: >> still showed up. I tried adding the setbusytimeout() and it is still not >> working. I made a pysqlite equivalent test, and it does the same thing. The underlying cause is still most likely concurrency issues which means the SQLite busy handler being invoked. pysqlite doesn't appear to let you set the handler, only the timeout (default 5 seconds). You may want to try with APSW again, but set your own busy handler and then see how often you are called and under what circumstances. One thing to be aware of is that SQLite won't call the busy handler if it believes there is a possibility of deadlock. Also if you use SQLite 3.5.x then you can also share a connection across threads rather than making a new one per thread. (You'll need apsw 3.5.9-r1 or pysqlite with check_same_thread set to False). Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIaZA4mOOfHg372QQRAvyeAJ0VIr4yV4zY6nOjY4XHjyOgspmpSACeOqE5 dxOHqHecywe6x2DUDRrZ++M= =LukH -----END PGP SIGNATURE-----