[sqlalchemy] Re: Database locking
Thanks Michael. Not sure if this is the only thing I need to do. Why disable connection pooling? Thanks, Garyc On Apr 26, 10:32 am, Michael Bayer mike...@zzzcomputing.com wrote: gazza wrote: Hello, I am using multiple servers to access a sqlite db via sqlachemy. I am using the latest SQLAlchemy and pysqlite-2.6.0. I get permenant locking and it causes mayhem. I did rebuild sqlite to make it --enable-threadsafe. Whats the approach to handle this problem? one helpful thing is to disable connection pooling. seehttp://www.sqlalchemy.org/docs/reference/dialects/sqlite.html#threadi... . Thanks, garyc -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] Re: Database locking
gazza wrote: Thanks Michael. Not sure if this is the only thing I need to do. Why disable connection pooling? it means the app will release filehandles completely when a connection is released, and also that individual threads in your app will use distinct connections. The QueuePool implementation, not the default for SQLite, will also provide the latter, but I've observed that QueuePool doesn't really provide much if any performance gain over straight file open/close per connection. SQLite really doesn't like multithreaded access on a single connection. Thanks, Garyc On Apr 26, 10:32 am, Michael Bayer mike...@zzzcomputing.com wrote: gazza wrote: Hello, I am using multiple servers to access a sqlite db via sqlachemy. I am using the latest SQLAlchemy and pysqlite-2.6.0. I get permenant locking and it causes mayhem. I did rebuild sqlite to make it --enable-threadsafe. Whats the approach to handle this problem? one helpful thing is to disable connection pooling. seehttp://www.sqlalchemy.org/docs/reference/dialects/sqlite.html#threadi... . Thanks, garyc -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] Re: Database locking
Thanks Michael. I am going to do some more research on SQLAlchemy and how it handles locks and its interaction with sqlite. I will try and post my findings next week. Thanks, Garyc --- On Mon, 4/26/10, Michael Bayer mike...@zzzcomputing.com wrote: From: Michael Bayer mike...@zzzcomputing.com Subject: Re: [sqlalchemy] Re: Database locking To: sqlalchemy@googlegroups.com Date: Monday, April 26, 2010, 4:39 PM gazza wrote: Thanks Michael. Not sure if this is the only thing I need to do. Why disable connection pooling? it means the app will release filehandles completely when a connection is released, and also that individual threads in your app will use distinct connections. The QueuePool implementation, not the default for SQLite, will also provide the latter, but I've observed that QueuePool doesn't really provide much if any performance gain over straight file open/close per connection. SQLite really doesn't like multithreaded access on a single connection. Thanks, Garyc On Apr 26, 10:32 am, Michael Bayer mike...@zzzcomputing.com wrote: gazza wrote: Hello, I am using multiple servers to access a sqlite db via sqlachemy. I am using the latest SQLAlchemy and pysqlite-2.6.0. I get permenant locking and it causes mayhem. I did rebuild sqlite to make it --enable-threadsafe. Whats the approach to handle this problem? one helpful thing is to disable connection pooling. seehttp://www.sqlalchemy.org/docs/reference/dialects/sqlite.html#threadi... . Thanks, garyc -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.