[mod_python] some bug fixes and new features in CVS

Gregory Trubetskoy grisha at modpython.org
Thu Aug 10 11:35:08 EST 2000


The CGI memory leak is not a problem with mod_python itself really. It has
to do with cgi.py and what it does. The thing to realize about mod_python
(or mod_perl, or php for that matter), is that code that is not careful
about memory allocation, will make apache process grow and grow.

I think that there are only two possible solutions - 

1. Some mod_python module that kills httpd when it reaches a certain
size. That's the technique mod_perl folks use.

2. A fix/rewrite of cgi.py.

The latter is the right thing to do, of course, but who knows when it will
happen....

I'd like to mention that this issue is certainly high on my TODO list, and
I'm open to any advice, suggetions, code snippets, patches, etc :-)

Grisha


On Thu, 10 Aug 2000, Alexis Iglauer wrote:

> Has the cgi memory leak been sorted out yet?  I am
> having to restart my apache at least once a day to not
> swamp my machine......
> 
> Keep up the excellent work!
> Regards
> Alexis
> --- Gregory Trubetskoy <grisha at modpython.org> wrote:
> > 
> > Just FYI - 
> > 
> > I've checked in to the CVS server on sourceforge the
> > version of mod_python
> > that has a number of new features, fixes and
> > improvements. Some changes
> > were quite radical which is why I don't want to put
> > it out as a release
> > just yet.
> > 
> > There are instructions on how to retrieve code from
> > CVS on 
> > http://sourceforge.net/cvs/?group_id=7107
> > 
> > Some of the most significant changes are:
> > 
> > o New PythonEnablePdb directive that allows handlers
> > to be executed
> >   within pdb (Python debugger).
> > 
> > o Proper finalization - Py_Finalize() C API function
> > is called with a
> >   child proces exits, thus making sure all objects
> > are destroyed properly.
> > 
> > o Dynamic handler registration. Now you can add
> > handlers from within
> >   handlers. Extremely useful if you want, for
> > example, to write an
> >   authentication handler that decides based on the
> > userid which handler
> >   will handle the request.
> > 
> > o There is now a way to have multiple keys in a
> > table via the
> >   add() function. Having multiple keys is critical
> > to being able
> >   to set multiple cookies, as someone pointed out on
> > this list.
> > 
> > o mod_python.c should compile with the -ansi option
> > without warnings.
> > 
> > 
> > --
> >   Gregory (Grisha) Trubetskoy
> >        grisha at modpython.org
> > 
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://www.modpython.org/mailman/listinfo/mod_python
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Kick off your party with Yahoo! Invites.
> http://invites.yahoo.com/
> 




More information about the Mod_python mailing list