On 2/1/07, Arturo FMwrote: > Hi! > Finally I have used this schema for reusing > connections: > > - Environment: Debian GNU/Linux, MySQL, Quixote, > Apache, mod_scgi. > > - Sessions persists in MySQL. > > - I wrote a class that inherits of Publisher. This > class create a db connection in its constructor. Then > I use: > pub = get_publisher() > conn = pub.conn > > - I wrote a method to close the connection: > def cleanup(self): > self.conn.close() This is how I built all my applications, originally with MySQL 4. The problem appeared when we upgraded to MySQL 5. > - The application stop and start each 7 hours. This > avoid problems in MySQL. It is a cron job. This is the workaround I've put in place. Ultimately I want to try SQLAlchemy's connection pool for the site I'm about to build, and backport it to the others if it works. You have to install all of SQLAlchemy for the connection pool, but you don't have to use it. According to the manual, the connection pool is designed to be used standalone. -- Mike Orr