summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes/index.rst1
-rw-r--r--docs/release-notes/version-4.4.8.rst34
-rw-r--r--setup.py22
-rw-r--r--src/server/__init__.py16
-rw-r--r--src/server/mod_wsgi.c23
-rw-r--r--src/server/wsgi_version.h4
-rw-r--r--win32/README.rst2
7 files changed, 85 insertions, 17 deletions
diff --git a/docs/release-notes/index.rst b/docs/release-notes/index.rst
index 5726dad..9b7b42b 100644
--- a/docs/release-notes/index.rst
+++ b/docs/release-notes/index.rst
@@ -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
diff --git a/docs/release-notes/version-4.4.8.rst b/docs/release-notes/version-4.4.8.rst
new file mode 100644
index 0000000..18cb2ce
--- /dev/null
+++ b/docs/release-notes/version-4.4.8.rst
@@ -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.
diff --git a/setup.py b/setup.py
index b6b71db..8329497 100644
--- a/setup.py
+++ b/setup.py
@@ -237,21 +237,21 @@ WITH_TARBALL_PACKAGE = %(WITH_TARBALL_PACKAGE)r
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'
diff --git a/src/server/__init__.py b/src/server/__init__.py
index 6333024..2e06db4 100644
--- a/src/server/__init__.py
+++ b/src/server/__init__.py
@@ -1912,6 +1912,16 @@ option_list = (
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',
@@ -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'):
@@ -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'):
@@ -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'):
diff --git a/src/server/mod_wsgi.c b/src/server/mod_wsgi.c
index 30ddbe5..c60f422 100644
--- a/src/server/mod_wsgi.c
+++ b/src/server/mod_wsgi.c
@@ -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);
diff --git a/src/server/wsgi_version.h b/src/server/wsgi_version.h
index 4fa83c4..5f1e2ce 100644
--- a/src/server/wsgi_version.h
+++ b/src/server/wsgi_version.h
@@ -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"
/* ------------------------------------------------------------------------- */
diff --git a/win32/README.rst b/win32/README.rst
index 67ac84c..c781f45 100644
--- a/win32/README.rst
+++ b/win32/README.rst
@@ -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: