[mod_python] mod_python slowness

Gregory (Grisha) Trubetskoy grisha at modpython.org
Tue May 13 13:22:18 EST 2003


Hmm... Well I'm kinda short on ideas. If it's any reassurance - I'm using
pg with mod_python for a small project right now, and it's very very fast,
i.e. I am not aware of any problems with combination of mod_python and
postgresql.

Grisha

On Tue, 13 May 2003, Alex Turner wrote:

>
> I'm pretty sure this is not a DNS problem.  I can break down each loop
> that calls the database, and it shows 0.7 seconds per row returning
> instead of like 0.03 seconds.  The dns servers are all configured
> correctly for both forward and reverse lookups, and I do not have the same
> problems in PHP (other the fact that PHP is crap compared to python - but
> it's not this slow).
>
> Alex Turner
> NetEconomist
>
> On Tue, 13 May 2003, Gregory (Grisha) Trubetskoy wrote:
>
> >
> > I'd first make sure it is not a DNS problem - probably the easiest thing
> > is to run tcpdump on port 53 to what DNS activity takes place when a
> > request comes in. Make sure that apache does not resolve host names, also
> > watch out for postgres using tcpwrappers to resolve host names for
> > incoming connections.
> >
> > Grisha
> >
> > On Tue, 13 May 2003, Alex Turner wrote:
> >
> > >
> > > I have a scripts that takes an XML document, munges it and turns it into
> > > HTML to be outputed to the user.  It's setup so that it will run either as
> > > a request handler in mod_python or as a stand alone application.  I am
> > > having extreme problem with the script being slow when running in
> > > mod_python.  I have done some timings, and it is 10-20 times slower
> > > that it is standalone.  The program makes calls to a Postgresql database
> > > using the stock pg module.  The system is running mod_python 3.0.3
> > > w/apache 2.0.43.  I just upgraded to mod_python 3.0.3 to see if that would
> > > help and it didn't.  Everything else is stock RedHat 8.0 - python-2.2.1-17.
> > >
> > > I can't seem to use the profiler to narrow down the problem at all because
> > > I can't seem to figure out how to execute the profiler on a function that
> > > takes arguments, and all the functions take at least the HTTP request
> > > object as an argument, which makes it hard to use the python profiler.
> > > Even so the script runs fine stand alone.  The one page I am looking at
> > > goes from 2.2 seconds to 23 seconds.
> > >
> > > Has anyone had any similar issues?
> > >
> > > Alex Turner
> > > NetEconomist
> > >
> > > _______________________________________________
> > > 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
> >
>



More information about the Mod_python mailing list