Version 2.0c5 of mod_wsgi now available for download.

2 views
Skip to first unread message

Graham Dumpleton

unread,
Mar 13, 2008, 6:29:38 AM3/13/08
to mod...@googlegroups.com
Google code site is still screwed up and wiki page updates aren't
working. All the same, have created tar ball for mod_wsgi version
2.0c5.

Until wiki page updates are working, updates to 2.0 changes file will
not show, but you can see them through the repository browser at:

http://code.google.com/p/modwsgi/source/browse/wiki/ChangesInVersion0200.wiki

Because of wiki page problems, also keeping link to tar ball off main
page, but you can see it by going to:

http://code.google.com/p/modwsgi/downloads/list

The main changes since version 2.0c4 which are contained in this
release candidate are:

1. Improvements to network performance for daemon mode processes. For
a simple hello world test application the improvement was about 40%.
In relation to the performance estimates previously quoted on mod_wsgi
site, this takes WSGIDaemonProcess case from 500 to about 700.

2. Support wsgi.file_wrapper with mmap/sendfile optimisations where
possible on UNIX systems.

3. Ability to change displayed name of daemon processes in 'ps' command output.

Various other changes have also been made which others may view as
equally important, but those above are the ones which would be most
attractive to most.

It is really hoped that this is now the final release candidate for
2.0 and in a few weeks the final official 2.0 can be released. It may
take me a little while to expand the wiki documentation to cover new
changes in this release candidate.

Anyway, please let me know of any major issues ASAP.

Enjoy.

Graham

Graham Dumpleton

unread,
Mar 13, 2008, 7:44:45 AM3/13/08
to mod...@googlegroups.com
Oh, one more notable change is that for daemon mode, process reloading
is now the default option for when changes are made to the WSGI script
file. In prior 2.0 release candidates you had to explicitly enable
process reloading option.

Graham

gert

unread,
Mar 13, 2008, 7:31:23 PM3/13/08
to modwsgi
ADAAAAAAALE windows users need you again :-)

Adal Chiriliuc

unread,
Mar 14, 2008, 3:55:31 AM3/14/08
to modwsgi
I have updated the Windows binaries.

http://adal.chiriliuc.com/mod_wsgi/revision_866_2.0c5/

Nicolas Steinmetz

unread,
Mar 14, 2008, 7:50:14 AM3/14/08
to modwsgi
I just updated the mod_wsgi2 PKGBUILD for Archlinux :

<http://aur.archlinux.org/packages.php?ID=13521>

Nicolas

linuxnow

unread,
Mar 15, 2008, 4:44:39 AM3/15/08
to modwsgi

On Linux, a fully updated Fedora, kernel-2.6.24.3-12.fc8,
httpd-2.2.8-1.fc8, it is terribly slow, it takes minutes to complete
each request.
svn845 works fine, but svn866 is not. I had to go back to the former
version.

If you want me to test anything, please let me know.

Graham Dumpleton

unread,
Mar 15, 2008, 6:31:51 AM3/15/08
to mod...@googlegroups.com
How are you testing it? Are you using embedded mode or daemon mode?
What is the test application? Are you using a simple hello world
application with a simple HTTP GET request, or something more
complicated?

Try it with a simple hello world application as described in
configuration guidelines. Make sure it is a simple GET request. Ensure
that LogLevel directive in Apache is set to 'debug' and see what the
Apache error log files are saying. Time exactly how long it takes to
do a request.

Graham

linuxnow

unread,
Mar 15, 2008, 12:19:29 PM3/15/08
to modwsgi


On Mar 15, 11:31 am, "Graham Dumpleton" <graham.dumple...@gmail.com>
wrote:
> How are you testing it? Are you using embedded mode or daemon mode?
> What is the test application? Are you using a simple hello world
> application with a simple HTTP GET request, or something more
> complicated?

Embedded mode, a paste deploy app pipeline, nothing complicated, that
works fine with the svn version that I've said.

> Try it with a simple hello world application as described in
> configuration guidelines. Make sure it is a simple GET request. Ensure
> that LogLevel directive in Apache is set to 'debug' and see what the
> Apache error log files are saying. Time exactly how long it takes to
> do a request.

It seems to work now. I don't know what has happened, sorry for the
noise. I restarted httpd many times to no luck, and now it has worked
at first try.
I'll give it a shot and let you know my impressions.

Graham Dumpleton

unread,
Mar 15, 2008, 5:06:48 PM3/15/08
to mod...@googlegroups.com
On 16/03/2008, linuxnow <linu...@gmail.com> wrote:
> > Try it with a simple hello world application as described in
> > configuration guidelines. Make sure it is a simple GET request. Ensure
> > that LogLevel directive in Apache is set to 'debug' and see what the
> > Apache error log files are saying. Time exactly how long it takes to
> > do a request.
>
>
> It seems to work now. I don't know what has happened, sorry for the
> noise. I restarted httpd many times to no luck, and now it has worked
> at first try.
> I'll give it a shot and let you know my impressions.

When loading a new version of module, it is sometimes necessary to do
an Apache 'stop' and 'start'. A 'restart' or 'graceful' is not enough.
Were you doing a full 'stop'?

Graham

Carl Nobile

unread,
Mar 15, 2008, 7:25:26 PM3/15/08
to mod...@googlegroups.com
Gram,

I think it is reload that you are talking about, because if you look at most of the apache scripts in /etc/init.d/ you will find that a restart actually stops then start apache where reload just forces apache to reload the config data. I my experience, with respect to mod_wsgi, a restart is only necessary when a new version of your code, trunk or otherwise, is installed. A reload seems to work fine when the application code or the *.wsgi file has changed.

-Carl

carl....@gmail.com
-------------------------------------------------------------------------------

Graham Dumpleton

unread,
Mar 16, 2008, 1:30:34 AM3/16/08
to mod...@googlegroups.com
On 16/03/2008, Carl Nobile <carl....@gmail.com> wrote:
> Gram,
>
> I think it is reload that you are talking about, because if you look at most
> of the apache scripts in /etc/init.d/ you will find that a restart actually
> stops then start apache where reload just forces apache to reload the config
> data. I my experience, with respect to mod_wsgi, a restart is only necessary
> when a new version of your code, trunk or otherwise, is installed. A reload
> seems to work fine when the application code or the *.wsgi file has changed.

It perhaps depends on what platform you are using and how that
distribution has modified the standard Apache apachectl script. The
'httpd' executable based on source code that comes from ASF doesn't
support the 'reload' option that you talk about.

In general, for an unmodified build of Apache from ASF source,
'restart' does not result in Apache parent process being killed.
Instead, it kills off all Apache child processes, unloads the
dynamically loaded Apache modules from parent Apache process and then
starts over again, applying configuration and reloading modules
(potentially new versions) as appropriate.

Even if a module has changed versions, this restart process should
work okay, but in some odd cases, for one reason or another it may not
be able to unload a module or some shared library it depends upon.
This can cause problems when starting over again.

Thus, why a full 'stop' is required so that Apache parent process is killed off.

Anyway, one thing I may have to do some checking on is a 'graceful'
restart. When mod_wsgi is communicating between Apache child process
and daemon process it uses a secret key to validate that it is
receiving data from where it expects to. This key includes the Apache
generation, which is incremented on a 'restart' or 'graceful'.

What I need to check is what lifetime the existing Apache child
processes have and check whether they could still handle requests. If
they can, problem is that daemon has been restarted and is expecting a
newer generation number than old Apache child processes. As a result
the daemon would reject request and so requests going through older
Apache child process would eventually fail with service unavailable.

It was intended to work this way, just not sure how long Apache child
processes can hang around and keep serving requests on 'graceful'
restart or whether guaranteed they will not handle new requests.

Graham

gert

unread,
Mar 16, 2008, 4:32:28 AM3/16/08
to modwsgi
everthing works on windows and linux

on ubuntu apache 2.2.8 i also have to make sure i dont forget to
schutdown the apache server first before doing make install

[Sun Mar 16 08:45:07 2008] [notice] SIGHUP received. Attempting to
restart
[Sun Mar 16 08:45:07 2008] [notice] seg fault or similar nasty error
detected in the parent process
[Sun Mar 16 08:46:52 2008] [info] mod_wsgi: Initializing Python.
[Sun Mar 16 08:46:52 2008] [warn] pid file /var/run/apache2.pid
overwritten -- Unclean shutdown of previous Apache run?
[Sun Mar 16 08:46:52 2008] [info] mod_wsgi (pid=14640): Attach
interpreter ''.

Response Headers
Date Sun, 16 Mar 2008 07:55:23 GMT
Server Apache/2.2.8 (Ubuntu) mod_wsgi/2.0c5 Python/2.5.2
Content-Length 1133
Keep-Alive timeout=5, max=91
Connection Keep-Alive
Content-Type text/xml

Request Headers
Host 192.168.1.17
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:
1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Accept text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Content-Type text/xml
Referer http://192.168.1.17/order/order.htm
Cookie SID=67c780695c0c8bd5f8a0c06c7e58257660160102

[Sun Mar 16 08:46:52 2008] [notice] Apache/2.2.8 (Ubuntu) mod_wsgi/
2.0c5 Python/ 2.5.2 configured -- resuming normal operations
[Sun Mar 16 08:46:52 2008] [info] Server built: Feb 2 2008 04:17:25
[Sun Mar 16 08:46:55 2008] [info] mod_wsgi (pid=15215): Attach
interpreter ''.
[Sun Mar 16 08:46:55 2008] [info] mod_wsgi (pid=15215): Adding '/srv/
trunk/wsgi' to path.
[Sun Mar 16 08:46:58 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=14640, process='', application=''): Loading WSGI script '/srv/
trunk/wsgi/products.py'., re ferer:
http://192.168.1.17/order/order.htm
[Sun Mar 16 08:47:16 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=14670, process='', application=''): Loading WSGI script '/srv/
trunk/wsgi/products.py'., re ferer:
http://192.168.1.17/order/order.htm

Response Headers
Date Sun, 16 Mar 2008 07:55:49 GMT
Server Apache/2.2.6 (Win32) mod_wsgi/2.0c5 Python/2.5.1
Keep-Alive timeout=5, max=78
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/xml

Request Headers
Host 192.168.1.19
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:
1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Accept text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Content-Type text/xml
Referer http://192.168.1.19/order/order.htm

[Sun Mar 16 07:14:23 2008] [warn] pid file C:/Program Files (x86)/
Apache/logs/httpd.pid overwritten -- Unclean shutdown of previous
Apache run?
[Sun Mar 16 07:14:23 2008] [warn] mod_wsgi: Compiled for Python/2.5.
[Sun Mar 16 07:14:23 2008] [warn] mod_wsgi: Runtime using Python/
2.5.1.
[Sun Mar 16 07:14:23 2008] [warn] mod_wsgi: Python module path 'C:\
\Windows\\system32\\python25.zip;C:\\Program Files (x86)\\Python\
\Lib;C:\\Program Files (x86)\\Python\\DLLs;C:\\Program Files (x86)\
\Python\\Lib\\lib-tk;;C:\\Program Files (x86)\\Apache\\bin'.
[Sun Mar 16 07:14:23 2008] [info] mod_wsgi: Initializing Python.
[Sun Mar 16 07:14:23 2008] [notice] Apache/2.2.6 (Win32) mod_wsgi/
2.0c5 Python/2.5.1 configured -- resuming normal operations
[Sun Mar 16 07:14:23 2008] [notice] Server built: Sep 5 2007 08:58:56
[Sun Mar 16 07:14:23 2008] [notice] Parent: Created child process 1612
[Sun Mar 16 07:14:23 2008] [warn] mod_wsgi: Compiled for Python/2.5.
[Sun Mar 16 07:14:23 2008] [warn] mod_wsgi: Runtime using Python/
2.5.1.
[Sun Mar 16 07:14:23 2008] [warn] mod_wsgi: Python module path 'C:\
\Windows\\system32\\python25.zip;C:\\Program Files (x86)\\Python\
\Lib;C:\\Program Files (x86)\\Python\\DLLs;C:\\Program Files (x86)\
\Python\\Lib\\lib-tk;;C:\\Program Files (x86)\\Apache\\bin'.
[Sun Mar 16 07:14:23 2008] [info] mod_wsgi: Initializing Python.
[Sun Mar 16 07:14:23 2008] [notice] Child 1612: Child process is
running
[Sun Mar 16 07:14:23 2008] [info] Parent: Duplicating socket 256 and
sending it to child process 1612
[Sun Mar 16 07:14:23 2008] [info] Parent: Duplicating socket 252 and
sending it to child process 1612
[Sun Mar 16 07:14:23 2008] [info] mod_wsgi (pid=1612): Attach
interpreter ''.
[Sun Mar 16 07:14:23 2008] [info] mod_wsgi (pid=1612): Adding 'C:/
Program Files (x86)/Apache/trunk/wsgi' to path.
[Sun Mar 16 07:14:23 2008] [notice] Child 1612: Acquired the start
mutex.
[Sun Mar 16 07:14:23 2008] [notice] Child 1612: Starting 64 worker
threads.
[Sun Mar 16 07:14:23 2008] [notice] Child 1612: Starting thread to
listen on port 443.
[Sun Mar 16 07:14:23 2008] [notice] Child 1612: Starting thread to
listen on port 80.
[Sun Mar 16 07:47:16 2008] [error] [client 192.168.1.19] File does not
exist: C:/Program Files (x86)/Apache/trunk/www/favicon.ico
[Sun Mar 16 07:47:20 2008] [info] mod_wsgi (pid=1612): Create
interpreter 'local'.
[Sun Mar 16 07:47:20 2008] [info] mod_wsgi (pid=1612): Adding 'C:/
Program Files (x86)/Apache/trunk/wsgi' to path.
[Sun Mar 16 07:47:20 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=1612, process='', application='local'): Loading WSGI script 'C:/
Program Files (x86)/Apache/trunk/wsgi/products.py'., referer:
http://192.168.1.19/order/order.htm
[Sun Mar 16 07:47:23 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=1612, process='', application='local'): Loading WSGI script 'C:/
Program Files (x86)/Apache/trunk/wsgi/order.py'., referer:
http://192.168.1.19/order/order.htm
[Sun Mar 16 07:47:29 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=1612, process='', application='local'): Loading WSGI script 'C:/
Program Files (x86)/Apache/trunk/wsgi/register.py'., referer:
http://192.168.1.19/register/register.htm
[Sun Mar 16 07:47:29 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=1612, process='', application='local'): Loading WSGI script 'C:/
Program Files (x86)/Apache/trunk/wsgi/download.py'., referer:
http://192.168.1.19/register/register.htm
[Sun Mar 16 07:47:47 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=1612, process='', application='local'): Loading WSGI script 'C:/
Program Files (x86)/Apache/trunk/wsgi/upload.py'., referer:
http://192.168.1.19/upload/upload.htm
[Sun Mar 16 07:47:58 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=1612, process='', application='local'): Loading WSGI script 'C:/
Program Files (x86)/Apache/trunk/wsgi/invoice.py'., referer:
http://192.168.1.19/invoice/invoice.htm?1
[Sun Mar 16 07:47:58 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=1612, process='', application='local'): Loading WSGI script 'C:/
Program Files (x86)/Apache/trunk/wsgi/barcode.py'., referer:
http://192.168.1.19/invoice/invoice.htm?1
[Sun Mar 16 09:00:34 2008] [info] [client 192.168.1.19] mod_wsgi
(pid=1612, process='', application='local'): Reloading WSGI script 'C:/
Program Files (x86)/Apache/trunk/wsgi/products.py'., referer:
http://192.168.1.19/order/order.htm

linuxnow

unread,
Mar 16, 2008, 4:36:56 AM3/16/08
to modwsgi


On Mar 16, 12:25 am, "Carl Nobile" <carl.nob...@gmail.com> wrote:
> Gram,
>
> I think it is reload that you are talking about, because if you look at most
> of the apache scripts in /etc/init.d/ you will find that a restart actually
> stops then start apache where reload just forces apache to reload the config
> data. I my experience, with respect to mod_wsgi, a restart is only necessary
> when a new version of your code, trunk or otherwise, is installed. A reload
> seems to work fine when the application code or the *.wsgi file has changed.

That is it, a restart stops and starts, reload just sends a SIGHUP. I
still don't know what happened, I'll try to reproduce it but the good
thing is that it works.

Bernd Zeimetz

unread,
Mar 17, 2008, 7:08:43 PM3/17/08
to mod...@googlegroups.com
Hi,

the package was just uploaded to Debian/experimental. Sorry for the
delay - I'm still not completely settled in my new home.

> It is really hoped that this is now the final release candidate for
> 2.0 and in a few weeks the final official 2.0 can be released. It may
> take me a little while to expand the wiki documentation to cover new
> changes in this release candidate.

That would be great, so we can get it into Debian's Lenny before the freeze.


Cheers,

Bernd
--
Bernd Zeimetz
<be...@bzed.de> <http://bzed.de/>

Graham Dumpleton

unread,
Mar 18, 2008, 1:43:58 AM3/18/08
to mod...@googlegroups.com
On 18/03/2008, Bernd Zeimetz <be...@bzed.de> wrote:
>
> Hi,
>
> the package was just uploaded to Debian/experimental. Sorry for the
> delay - I'm still not completely settled in my new home.
>
>
> > It is really hoped that this is now the final release candidate for
> > 2.0 and in a few weeks the final official 2.0 can be released. It may
> > take me a little while to expand the wiki documentation to cover new
> > changes in this release candidate.
>
>
> That would be great, so we can get it into Debian's Lenny before the freeze.

When is the cut off? Would they still except 2.0 even though it is
still in experimental stream? In other words, is getting it into
testing stream sufficient or does it also need to pass through that
stream as well?

Graham

Reply all
Reply to author
Forward
0 new messages