Skip to content

Commit

Permalink
Merge branch 'release/4.4.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Feb 8, 2015
2 parents 8f3e537 + 71f89d8 commit 3cc8bba
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 17 deletions.
1 change: 1 addition & 0 deletions docs/release-notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes
.. toctree::
:maxdepth: 2

version-4.4.8.rst
version-4.4.7.rst
version-4.4.6.rst
version-4.4.5.rst
Expand Down
34 changes: 34 additions & 0 deletions docs/release-notes/version-4.4.8.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
=============
Version 4.4.8
=============

Version 4.4.8 of mod_wsgi can be obtained from:

https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.4.8

For details on the availability of Windows binaries see:

https://github.com/GrahamDumpleton/mod_wsgi/tree/master/win32

Bugs Fixed
----------

1. The eviction timeout was not being correctly applied when request timeout
wasn't being applied at the same time. It may have partly worked if any of
inactivity or graceful timeout were also specified, but the application of
the timeout may still have been delayed.

New Features
------------

1. Added the ``--error-log-name`` option to ``mod_wsgi-express`` to allow
the name of the file used for the error log, when being written to the log
directory, to be overridden.

2. Added the ``--access-log-name`` option to ``mod_wsgi-express`` to allow
the name of the file used for the access log, when being written to the log
directory, to be overridden.

3. Added the ``--startup-log-name`` option to ``mod_wsgi-express`` to allow
the name of the file used for the startup log, when being written to the log
directory, to be overridden.
22 changes: 11 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,21 @@ def get_apxs_config(query):
WITH_HTTPD_PACKAGE = %(WITH_HTTPD_PACKAGE)r
if WITH_HTTPD_PACKAGE:
import mod_wsgi.httpd
PACKAGES = os.path.join(os.path.dirname(mod_wsgi.httpd.__file__))
BINDIR = os.path.join(PACKAGES, 'bin')
from mod_wsgi_packages.httpd import __file__ as PACKAGES_ROOTDIR
PACKAGES_ROOTDIR = os.path.dirname(PACKAGES_ROOTDIR)
BINDIR = os.path.join(PACKAGES_ROOTDIR, 'bin')
SBINDIR = BINDIR
LIBEXECDIR = os.path.join(PACKAGES, 'modules')
SHLIBPATH = os.path.join(PACKAGES, 'lib')
LIBEXECDIR = os.path.join(PACKAGES_ROOTDIR, 'modules')
SHLIBPATH = os.path.join(PACKAGES_ROOTDIR, 'lib')
elif WITH_TARBALL_PACKAGE:
import mod_wsgi.packages
PACKAGES = os.path.join(os.path.dirname(mod_wsgi.packages.__file__))
BINDIR = os.path.join(PACKAGES, 'apache', 'bin')
from mod_wsgi.packages import __file__ as PACKAGES_ROOTDIR
PACKAGES_ROOTDIR = os.path.dirname(PACKAGES_ROOTDIR)
BINDIR = os.path.join(PACKAGES_ROOTDIR, 'apache', 'bin')
SBINDIR = BINDIR
LIBEXECDIR = os.path.join(PACKAGES, 'apache', 'modules')
LIBEXECDIR = os.path.join(PACKAGES_ROOTDIR, 'apache', 'modules')
SHLIBPATH = []
SHLIBPATH.append(os.path.join(PACKAGES, 'apr-util', 'lib'))
SHLIBPATH.append(os.path.join(PACKAGES, 'apr', 'lib'))
SHLIBPATH.append(os.path.join(PACKAGES_ROOTDIR, 'apr-util', 'lib'))
SHLIBPATH.append(os.path.join(PACKAGES_ROOTDIR, 'apr', 'lib'))
SHLIBPATH = ':'.join(SHLIBPATH)
else:
BINDIR = '%(BINDIR)s'
Expand Down
16 changes: 13 additions & 3 deletions src/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,16 @@ def check_percentage(option, opt_str, value, parser):
optparse.make_option('--access-log-format', metavar='FORMAT',
help='Specify the format of the access log records.'),

optparse.make_option('--error-log-name', metavar='FILE-NAME',
default='error_log', help='Specify the name of the error '
'log file when it is being written to the log directory.'),
optparse.make_option('--access-log-name', metavar='FILE-NAME',
default='access_log', help='Specify the name of the access '
'log file when it is being written to the log directory.'),
optparse.make_option('--startup-log-name', metavar='FILE-NAME',
default='startup_log', help='Specify the name of the startup '
'log file when it is being written to the log directory.'),

optparse.make_option('--rotate-logs', action='store_true', default=False,
help='Flag indicating whether log rotation should be performed.'),
optparse.make_option('--max-log-size', default=5, type='int',
Expand Down Expand Up @@ -2215,7 +2225,7 @@ def _cmd_setup_server(command, args, options):

if not options['log_to_terminal']:
options['error_log_file'] = os.path.join(options['log_directory'],
'error_log')
options['error_log_name'])
else:
try:
with open('/dev/stderr', 'w'):
Expand All @@ -2228,7 +2238,7 @@ def _cmd_setup_server(command, args, options):

if not options['log_to_terminal']:
options['access_log_file'] = os.path.join(
options['log_directory'], 'access_log')
options['log_directory'], options['access_log_name'])
else:
try:
with open('/dev/stdout', 'w'):
Expand Down Expand Up @@ -2456,7 +2466,7 @@ def _cmd_setup_server(command, args, options):
if options['startup_log']:
if not options['log_to_terminal']:
options['startup_log_file'] = os.path.join(
options['log_directory'], 'startup_log')
options['log_directory'], options['startup_log_name'])
else:
try:
with open('/dev/stderr', 'w'):
Expand Down
23 changes: 23 additions & 0 deletions src/server/mod_wsgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -8421,6 +8421,29 @@ static void *wsgi_monitor_thread(apr_thread_t *thd, void *data)
}
}

if (!restart && wsgi_eviction_timeout) {
if (graceful_time) {
if (graceful_time <= now) {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Daemon process "
"graceful timer expired '%s'.", getpid(),
group->name);

restart = 1;
}
else {
if (!period || ((graceful_time - now) < period))
period = graceful_time - now;
else if (wsgi_eviction_timeout < period)
period = wsgi_eviction_timeout;
}
}
else {
if (!period || (wsgi_eviction_timeout < period))
period = wsgi_eviction_timeout;
}
}

if (restart) {
wsgi_daemon_shutdown++;
kill(getpid(), SIGINT);
Expand Down
4 changes: 2 additions & 2 deletions src/server/wsgi_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#define MOD_WSGI_MAJORVERSION_NUMBER 4
#define MOD_WSGI_MINORVERSION_NUMBER 4
#define MOD_WSGI_MICROVERSION_NUMBER 7
#define MOD_WSGI_VERSION_STRING "4.4.7"
#define MOD_WSGI_MICROVERSION_NUMBER 8
#define MOD_WSGI_VERSION_STRING "4.4.8"

/* ------------------------------------------------------------------------- */

Expand Down
2 changes: 1 addition & 1 deletion win32/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ version of the Microsoft C/C++ compiler as the version of Python you are
using.

4. That you are using a mod_wsgi binary built with the same version of
the Microsoft C/++ compiler as the version of Python you are using.
the Microsoft C/C++ compiler as the version of Python you are using.

The Microsoft C/C++ compiler versions which were used for various Python
versions are:
Expand Down

0 comments on commit 3cc8bba

Please sign in to comment.