Error message generated by mod_wsgi

Skip to first unread message

Thomas W Ekberg

Jul 13, 2022, 7:12:34 PMJul 13
to modwsgi
1. Which version of mod_wsgi you are using and if using a packaged
distribution, who provided the distribution. If you are not using the
latest version, then upgrade first and verify the problem still occurs
with the latest version.
4.9.0, daemon mode

2. Which version of Python you are using and if using a packaged distribution, who provided the distribution.

3. Which version of Apache you are using and if using a packaged
distribution, who provided the distribution. If not using latest patch
revision of Apache 2.2, then consider upgrading and trying again.

4. What operating system you are using.
Ubuntu 22.04

5. Details on any third party packages being used and what versions of those packages.
roundup 2.1 -

6. The mod_wsgi configuration you are using from Apache configuration
No modules-enabled/wsgi.conf values were specified. All remained
commented out.

7. Relevant error messages from the Apache error logs.

[Wed Jul 13 14:49:16.925053 2022] [wsgi:error] [pid 109702:tid 140471824799296] [remote] mod_wsgi (pid=109702): Exception occurred processing WSGI script '/mnt/trackers/it_test/apache/'.
[Wed Jul 13 14:49:16.925097 2022] [wsgi:error] [pid 109702:tid 140471824799296] [remote] RuntimeError: response has not been started

The exception message is generated in server/wsgi_logger.c at lines 628 and
633.  This code is in the wsgi_log_python_error function. This
function is called 29 times in server/mod_wsgi.c. It would be nice if
those 29 places passed a message with some detail on the error
encountered. Sophos is turned off, and SELinux is disabled.

The roundup code uses request.wfile to write its HTML code. The
rouhdup code that does this completes with no error and passes control
back to mod_wsgi, which generates the above messages in the apache
error.log file.

Do you have an idea on how to troubleshoot this problem?

Graham Dumpleton

Jul 13, 2022, 7:16:36 PMJul 13
The error means that the WSGI application has tried to return response content but has not called the WSGI start_response() callable first.

What WSGI framework is being used, or is this a custom WSGI application you are trying to create from scratch?


You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Thomas W Ekberg

Jul 15, 2022, 10:37:29 AMJul 15
to modwsgi

Thank you for your response. The problem was that an exception was thrown, bypassing the code that does the start_response() call. Fixing the problem allowed the web page to display.


Reply all
Reply to author
0 new messages