[mod_python] Windows performance problem

Dominique.Holzwarth at ch.delarue.com Dominique.Holzwarth at ch.delarue.com
Mon Jun 2 01:50:56 EDT 2008


Hi Bill

About your questions number 3 and 4:
- httpd.exe is THE apache http webserver ;-). That webserver spawns a process for client requests which then calls an instance of the python interpreter to serve your python scripts (don't ask me about the details :-p). I don't know why the log is stating it as error, but to me it's not really an error (I get the same 3 lines in my apache log btw ;-)).
- the python path that's mentioned is a environment- (or system-) variable. It can bet set under "control panel" --> "system" --> "advanced" --> environment variables.

As a general comment about mod_python being slow I'd advice you to check whether it's really mod_python that's causing the problem or not. Maybe your python scripts are using some other "3rd party" tools that you changed when you rebuilt your PC (I am thinking of stuff like COM etc.) ?

On my machine mod_python alone runs very smooth but when I add COM stuff (for example MS XML parser etc) or do some subversion stuff the speed is kinda horrible... :-) But I doubt that's mod_python's fault ;-)

Greetings
Dominique

________________________________
From: William Chapman [mailto:jeddahbill at gmail.com]
Sent: Samstag, 31. Mai 2008 19:50
To: Mod_python at modpython.org
Subject: [mod_python] Windows performance problem

I'm new to this list, but have been using mod_python successfully for three years in a web app served by both Linux (Ubuntu) and Windows (XP sp2 32bit AND 64bit).  I use two hosts to serve: one for testing (semi-public); one for development.  Both hosts are dual-boot (Linux/Windows) and will serve the identical web app installation from the same (NTFS file system) directories.

My problems started when the development host went belly-up and I rebuilt the computer.  The Windows installation was upgraded (?) from 32bit to 64bit XP sp2.  (I don't know if going to x64 Windows is part of the problem; I doubt it.)  Upon bringing up the new development host, all went well with the Linux side, but under Windows, the web app is perfroming poorly.  The application accesses take much too long.  Historically, the Windows & Linux installations were comparable, and I never had performance complaints.  Now, the new Windows installation is 5x to 10x slower than previously.  To emphasize, the mod_python is "working," but very slowly, and comletely unlike my previous experience with Windows/Apache/mod_python, not to mention my current testing host which is fine.

The setup (all installed from binaries):
Windows XP x64 sp2
apache 2.2.8
mod_python 3.3.1
Python 2.5.2 (installed separately)

Note:  I am not exactly sure of the order in which I installed Apache/mod_python & Python 2.5.  Could this matter?
I did uninstall and reinstall mod_python but performance/symptoms didn't seem to change.

The only clues:
Three lines together from apache error.log (long lines - STRETCH BROWSER) (file also attached) (also see Graham's email here<http://www.modpython.org/pipermail/mod_python/2006-April/020825.html>.):
[Fri May 30 17:38:57 2008] [error] python_init: Python version mismatch, expected '2.5', found '2.5.2'.
[Fri May 30 17:38:58 2008] [error] python_init: Python executable found 'C:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\bin\\httpd.exe'.
[Fri May 30 17:38:58 2008] [error] python_init: Python path being used 'C:\\WINDOWS\\system32\\python25.zip;C:\\Python25\\Lib;C:\\Python25\\DLLs;C:\\Python25\\Lib\\lib-tk;;C:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\bin'.

I have read several of the threads from the list on this subject and am confused about the following points:
(1) In the "Python version mismatch" error, the "found" version matches the version of Python I installed on the Windows machine.  mod_python "expected 2.5".  Where is that supposed to come from?  I could not find Python 2.5 at http://python.org.
(2) Apparently the "Python version mismatch" error message is not enough to stop mod_python from working, because it is "working."
(3) The "Python executable found" error message points to "...\\Apache2.2\\bin\\httpd.exe"  This does not look like a "Python executable."  (?)
(4) The "Python path being used" error message specifies a series of paths.  Where do those paths come from?  Can I affect those values?  Taken as a whole it doesn't match the system path environment variable I'm able to set as a Windows user.

Random thought: I always thought that mod_python included an embedded Python interpreter, but reading suggests mod_python links to Python libraries.

My analysis:  I suspect that the principle benefit of a mod_python installation is not being realized.  It seems that the interpreter is having to be restarted for each access.  Is there another explanation for the poor performance?

At any rate I would greatly appreciate any suggestions or insights you might have!!

With many thanks,
-- Bill Chapman


*****************************************************************************
This e-mail and any files attached are strictly confidential, may be legally
privileged and are intended solely for the addressee. If you are not the
intended recipient please notify the sender immediately by return email and
then delete the e-mail and any attachments immediately.

The views and or opinions expressed in this e-mail are not necessarily the
views of De La Rue plc or any of its subsidiaries and the De La Rue Group
of companies, their directors, officers and employees make no representation
about and accept no liability for its accuracy or completeness.

You should ensure that you have adequate virus protection as the De La Rue
Group of companies do not accept liability for any viruses.

De La Rue plc Registered No.3834125, De La Rue Holdings plc Registered
No 58025 and De La Rue International Limited Registered No 720284 are all
registered in England with their registered office at:
De La Rue House, Jays Close, Viables, Hampshire RG22 4BS
*****************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080602/33165285/attachment.html


More information about the Mod_python mailing list