[mod_python] Creating many mysqld processes

Michael C. Neel neel at mediapulse.com
Wed Jul 14 15:42:31 EDT 2004


Also, MySQLdb has known garbage collection issues, which I think are not
yet fixed in the main release, so you'll need to get a cvs version or
patch it yourself.  Looking through the sf.net forums/bug reports for
MySQLdb for the details and what you can do.  And it still doesn't hurt
to keep MaxClientRequests around 100 for apache as well.

Mike

On Wed, 2004-07-14 at 12:39, Sean Abrahams wrote:

> On Sat, 10 Jul 2004 09:03:44 -0700, Paul Eden
> <peden at americanphysicians.net> wrote:
> > I created an intranet application with mysql and mod_python and am
> > having trouble with extra mysqld processes on the server.
> > 
> > They don't seem to be being destroyed/collected until I restart the
> > mysql server.
> > 
> > This is probably some error on my part in coding the application, but I
> > am not sure where the problem is.
> > 
> > Will someone please tell me at what point in the DB API specification
> > the extra mysqld are destroyed if at all or how I can get rid of them
> > after they are finished?  Is it just connection.close()?
> 
> Mod_python is a long living process. As long as Apache is running, so
> is your mod_python application. Whenever you make a connection to a
> database from your mod_python application, it will not be disconnected
> until you call connection.close() or you stop Apache or MySQL.
> 
> What you will need to do is create a ConnectionPool which will store
> connections to the database and hand them out when you need them.
> There is a FAQ entry on the mod_python web site:
> 
> http://www.modpython.org/FAQ/faqw.py?req=show&file=faq03.003.htp
>  
> Although, the example only shows how to connect to one database, not
> multiples. If you are connecting to multiple different databases, make
> DB_CONN a dict that stores each database connection in its own key.
> 
> --Sean
> 
> > mod_python-3.1.3-1
> > MySQL-python-0.9.1-6
> > python-2.2.3-5
> > httpd-2.0.46-32.ent.3
> > Red Hat Enterprise Linux ES release 3
> > 
> > Thank You,
> > 
> > Paul
> > 
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> >
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

__________________________________ 

michael.neel at mediapulse.com
vice president of information systems
865.675.4455 x30
800.380.4514

www.mediapulse.com
__________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://modpython.org/pipermail/mod_python/attachments/20040714/0c0c7550/attachment.html


More information about the Mod_python mailing list