[mod_python] mod_python slowness

Gregory (Grisha) Trubetskoy grisha at modpython.org
Tue May 13 10:31:58 EST 2003


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
>



More information about the Mod_python mailing list