Thank you for your reply Graham.
1. Changed Apache logging from debug to info, and no luck.
2. mod_wsgi version is 4.3.0
3. Moved project to var/www and double checked all security, no luck
4. There is a segmentation fault (see below)
*What I really don't understand is why it runs under my development Linux
VM with what I believe have the same components installed.
Here is the latest Apache Log for the failing server:
Mon Mar 27 09:55:39.384258 2017] [ssl:info] [pid 5134] AH01887: Init:
Initializing (virtual) servers for SSL
[Mon Mar 27 09:55:39.384309 2017] [ssl:info] [pid 5134] AH01876:
mod_ssl/2.4.18 compiled against Server: Apache/2.4.18, Library:
OpenSSL/1.0.2g
[Mon Mar 27 09:55:39.392854 2017] [socache_shmcb:info] [pid 5135] AH00830:
Shared memory socache initialised
[Mon Mar 27 09:55:39.392877 2017] [ssl:info] [pid 5135] AH01887: Init:
Initializing (virtual) servers for SSL
[Mon Mar 27 09:55:39.392882 2017] [ssl:info] [pid 5135] AH01876:
mod_ssl/2.4.18 compiled against Server: Apache/2.4.18, Library:
OpenSSL/1.0.2g
[Mon Mar 27 09:55:39.392939 2017] [wsgi:warn] [pid 5135] mod_wsgi: Compiled
for Python/3.5.1+.
[Mon Mar 27 09:55:39.392943 2017] [wsgi:warn] [pid 5135] mod_wsgi: Runtime
using Python/3.5.2.
[Mon Mar 27 09:55:39.393285 2017] [wsgi:info] [pid 5138] mod_wsgi
(pid=5138): Starting process 'opsproj' with uid=33, gid=33 and threads=15.
[Mon Mar 27 09:55:39.393524 2017] [wsgi:info] [pid 5138] mod_wsgi
(pid=5138): Python home /var/www/ops/opsenv.
[Mon Mar 27 09:55:39.393545 2017] [wsgi:info] [pid 5138] mod_wsgi
(pid=5138): Initializing Python.
[Mon Mar 27 09:55:39.394348 2017] [mpm_prefork:notice] [pid 5135] AH00163:
Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_wsgi/4.3.0 Python/3.5.2
configured -- resuming normal operations
[Mon Mar 27 09:55:39.394363 2017] [mpm_prefork:info] [pid 5135] AH00164:
Server built: 2016-07-14T12:32:26
[Mon Mar 27 09:55:39.394373 2017] [core:notice] [pid 5135] AH00094: Command
line: '/usr/sbin/apache2'
[Mon Mar 27 09:55:39.394723 2017] [wsgi:info] [pid 5143] mod_wsgi
(pid=5143): Initializing Python.
[Mon Mar 27 09:55:39.397980 2017] [wsgi:info] [pid 5142] mod_wsgi
(pid=5142): Initializing Python.
[Mon Mar 27 09:55:39.401989 2017] [wsgi:info] [pid 5141] mod_wsgi
(pid=5141): Initializing Python.
[Mon Mar 27 09:55:39.405943 2017] [wsgi:info] [pid 5140] mod_wsgi
(pid=5140): Initializing Python.
[Mon Mar 27 09:55:39.409930 2017] [wsgi:info] [pid 5139] mod_wsgi
(pid=5139): Initializing Python.
[Mon Mar 27 09:55:39.411936 2017] [wsgi:info] [pid 5138] mod_wsgi
(pid=5138): Attach interpreter ''.
[Mon Mar 27 09:55:39.421005 2017] [wsgi:info] [pid 5138] mod_wsgi
(pid=5138): Adding '/var/www/ops/ops/opsproj' to path.
[Mon Mar 27 09:55:39.466401 2017] [wsgi:info] [pid 5142] mod_wsgi
(pid=5142): Attach interpreter ''.
[Mon Mar 27 09:55:39.470214 2017] [wsgi:info] [pid 5141] mod_wsgi
(pid=5141): Attach interpreter ''.
[Mon Mar 27 09:55:39.478374 2017] [wsgi:info] [pid 5140] mod_wsgi
(pid=5140): Attach interpreter ''.
[Mon Mar 27 09:55:39.482019 2017] [wsgi:info] [pid 5143] mod_wsgi
(pid=5143): Attach interpreter ''.
[Mon Mar 27 09:55:39.486685 2017] [wsgi:info] [pid 5139] mod_wsgi
(pid=5139): Attach interpreter ''.
[Mon Mar 27 09:55:44.475223 2017] [wsgi:info] [pid 5138] [remote
192.168.1.89:1106] mod_wsgi (pid=5138, process='opsproj', application=''):
Loading WSGI script '/var/www/ops/ops/opsproj/opsproj/wsgi.py'.
[Mon Mar 27 09:55:45.401534 2017] [wsgi:info] [pid 5164] mod_wsgi
(pid=5164): Initializing Python.
[Mon Mar 27 09:55:45.441007 2017] [wsgi:info] [pid 5164] mod_wsgi
(pid=5164): Attach interpreter ''.
[Mon Mar 27 09:55:45.543577 2017] [wsgi:error] [pid 5142] [client
192.168.1.89:50864] Truncated or oversized response headers received from
daemon process 'opsproj': /var/www/ops/ops/opsproj/opsproj/wsgi.py
[Mon Mar 27 09:55:46.402274 2017] [core:notice] [pid 5135] AH00052: child
pid 5138 exit signal Segmentation fault (11)
[Mon Mar 27 09:55:46.402336 2017] [wsgi:info] [pid 5135] mod_wsgi
(pid=5138): Process 'opsproj' has died, deregister and restart it.
[Mon Mar 27 09:55:46.402341 2017] [wsgi:info] [pid 5135] mod_wsgi
(pid=5138): Process 'opsproj' terminated by signal 11
[Mon Mar 27 09:55:46.402345 2017] [wsgi:info] [pid 5135] mod_wsgi
(pid=5138): Process 'opsproj' has been deregistered and will no longer be
monitored.
[Mon Mar 27 09:55:46.402869 2017] [wsgi:info] [pid 5165] mod_wsgi
(pid=5165): Starting process 'opsproj' with uid=33, gid=33 and threads=15.
[Mon Mar 27 09:55:46.403119 2017] [wsgi:info] [pid 5165] mod_wsgi
(pid=5165): Python home /var/www/ops/opsenv.
[Mon Mar 27 09:55:46.403136 2017] [wsgi:info] [pid 5165] mod_wsgi
(pid=5165): Initializing Python.
[Mon Mar 27 09:55:46.424439 2017] [wsgi:info] [pid 5165] mod_wsgi
(pid=5165): Attach interpreter ''.
[Mon Mar 27 09:55:46.434162 2017] [wsgi:info] [pid 5165] mod_wsgi
(pid=5165): Adding '/var/www/ops/ops/opsproj' to path.
*Here is the log for the development station that works:*
[Mon Mar 27 10:06:04.571998 2017] [ssl:info] [pid 3011] AH01887: Init:
Initializing (virtual) servers for SSL
[Mon Mar 27 10:06:04.572019 2017] [ssl:info] [pid 3011] AH01876:
mod_ssl/2.4.18 compiled against Server: Apache/2.4.18, Library:
OpenSSL/1.0.2g
[Mon Mar 27 10:06:04.579912 2017] [socache_shmcb:info] [pid 3012] AH00830:
Shared memory socache initialised
[Mon Mar 27 10:06:04.579922 2017] [ssl:info] [pid 3012] AH01887: Init:
Initializing (virtual) servers for SSL
[Mon Mar 27 10:06:04.579925 2017] [ssl:info] [pid 3012] AH01876:
mod_ssl/2.4.18 compiled against Server: Apache/2.4.18, Library:
OpenSSL/1.0.2g
[Mon Mar 27 10:06:04.579968 2017] [wsgi:warn] [pid 3012] mod_wsgi: Compiled
for Python/3.5.1+.
[Mon Mar 27 10:06:04.579970 2017] [wsgi:warn] [pid 3012] mod_wsgi: Runtime
using Python/3.5.2.
[Mon Mar 27 10:06:04.580884 2017] [mpm_prefork:notice] [pid 3012] AH00163:
Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_wsgi/4.3.0 Python/3.5.2
configured -- resuming normal operations
[Mon Mar 27 10:06:04.580895 2017] [mpm_prefork:info] [pid 3012] AH00164:
Server built: 2016-07-14T12:32:26
[Mon Mar 27 10:06:04.580900 2017] [core:notice] [pid 3012] AH00094: Command
line: '/usr/sbin/apache2'
[Mon Mar 27 10:06:04.581118 2017] [wsgi:info] [pid 3018] mod_wsgi
(pid=3018): Initializing Python.
[Mon Mar 27 10:06:04.584941 2017] [wsgi:info] [pid 3019] mod_wsgi
(pid=3019): Initializing Python.
[Mon Mar 27 10:06:04.588570 2017] [wsgi:info] [pid 3017] mod_wsgi
(pid=3017): Initializing Python.
[Mon Mar 27 10:06:04.590172 2017] [wsgi:info] [pid 3020] mod_wsgi
(pid=3020): Initializing Python.
[Mon Mar 27 10:06:04.595403 2017] [wsgi:info] [pid 3016] mod_wsgi
(pid=3016): Initializing Python.
[Mon Mar 27 10:06:04.596400 2017] [wsgi:info] [pid 3015] mod_wsgi
(pid=3015): Starting process 'opsproj' with uid=33, gid=33 and threads=15.
[Mon Mar 27 10:06:04.596519 2017] [wsgi:info] [pid 3015] mod_wsgi
(pid=3015): Python home /home/dcripps/Development/ops/opsenv.
[Mon Mar 27 10:06:04.596528 2017] [wsgi:info] [pid 3015] mod_wsgi
(pid=3015): Initializing Python.
[Mon Mar 27 10:06:04.660276 2017] [wsgi:info] [pid 3018] mod_wsgi
(pid=3018): Attach interpreter ''.
[Mon Mar 27 10:06:04.670666 2017] [wsgi:info] [pid 3015] mod_wsgi
(pid=3015): Attach interpreter ''.
[Mon Mar 27 10:06:04.673914 2017] [wsgi:info] [pid 3017] mod_wsgi
(pid=3017): Attach interpreter ''.
[Mon Mar 27 10:06:04.676926 2017] [wsgi:info] [pid 3016] mod_wsgi
(pid=3016): Attach interpreter ''.
[Mon Mar 27 10:06:04.686730 2017] [wsgi:info] [pid 3019] mod_wsgi
(pid=3019): Attach interpreter ''.
[Mon Mar 27 10:06:04.717503 2017] [wsgi:info] [pid 3015] mod_wsgi
(pid=3015): Adding '/home/dcripps/Development/ops/opsproj' to path.
[Mon Mar 27 10:06:04.719198 2017] [wsgi:info] [pid 3020] mod_wsgi
(pid=3020): Attach interpreter ''.
[Mon Mar 27 10:06:09.312389 2017] [wsgi:info] [pid 3015] mod_wsgi
(pid=3015): Create interpreter '127.0.1.1|'.
[Mon Mar 27 10:06:09.330037 2017] [wsgi:info] [pid 3015] mod_wsgi
(pid=3015): Adding '/home/dcripps/Development/ops/opsproj' to path.
[Mon Mar 27 10:06:09.330461 2017] [wsgi:info] [pid 3015] [remote
127.0.0.1:10128] mod_wsgi (pid=3015, process='opsproj',
application='127.0.1.1|'): Loading WSGI script
'/home/dcripps/Development/ops/opsproj/opsproj/wsgi.py'.
[Mon Mar 27 10:06:09.588547 2017] [wsgi:info] [pid 3043] mod_wsgi
(pid=3043): Initializing Python.
[Mon Mar 27 10:06:09.620745 2017] [wsgi:info] [pid 3043] mod_wsgi
(pid=3043): Attach interpreter ''.
~
On Saturday, March 25, 2017 at 6:36:17 PM UTC-4, Graham Dumpleton wrote:
>
> What mod_wsgi version are you using?
>
> Ensure that LogLevel directive of Apache is set to 'info' and not 'err' or
> 'warn'.
>
> With 'info' set, mod_wsgi will log whether daemon processes are being
> restarted and why.
>
> Also look in main Apache error log for any messages about segmentation
> faults.
>
> This will help in determining if is caused by daemon process crashing.
>
> Only other possibility is that you are indeed sending response headers
> with too long of a value. This can occur when using special HTTP
> authentication mechanisms. More recent mod_wsgi versions provide a way of
> overriding the default size that Apache allowed for response header size.
>
> Graham
>
> On 26 Mar 2017, at 4:43 AM, Derek Cripps <[email protected] <javascript:>>
> wrote:
>
> apache2 -M
> Loaded Modules:
> core_module (static)
> so_module (static)
> watchdog_module (static)
> http_module (static)
> log_config_module (static)
> logio_module (static)
> version_module (static)
> unixd_module (static)
> access_compat_module (shared)
> alias_module (shared)
> auth_basic_module (shared)
> authn_core_module (shared)
> authn_file_module (shared)
> authz_core_module (shared)
> authz_host_module (shared)
> authz_user_module (shared)
> autoindex_module (shared)
> deflate_module (shared)
> dir_module (shared)
> env_module (shared)
> filter_module (shared)
> mime_module (shared)
> mpm_prefork_module (shared)
> negotiation_module (shared)
> rewrite_module (shared)
> setenvif_module (shared)
> socache_shmcb_module (shared)
> ssl_module (shared)
> status_module (shared)
> wsgi_module (shared)
>
>
> On Saturday, March 25, 2017 at 1:26:45 PM UTC-4, Derek Cripps wrote:
>>
>> Tried again today, and found that this can be run using: python
>> manage.py runmodwsgi
>> So, I gave that a try and received the same error message. I believe
>> this would rule out the apache config file being the issue, but I could be
>> wrong?
>>
>> Here is some additional information:
>>
>> ldd /usr/lib/apache2/modules/mod_wsgi.so
>> linux-vdso.so.1 => (0x00007fff862f9000)
>> libpython3.5m.so.1.0 =>
>> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0 (0x00007f8321c90000)
>> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
>> (0x00007f8321a73000)
>> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f83216a9000)
>> libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1
>> (0x00007f8321480000)
>> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8321266000)
>> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
>> (0x00007f8321061000)
>> libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1
>> (0x00007f8320e5e000)
>> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8320b55000)
>> /lib64/ld-linux-x86-64.so.2 (0x000055f6db541000)
>>
>>
>>
>>
>> On Friday, March 24, 2017 at 8:20:45 PM UTC-4, Derek Cripps wrote:
>>>
>>> Good afternoon,
>>>
>>> I have been dealing with this issue for a few weeks now, and am at a
>>> complete loss.
>>>
>>> My django applications works perfectly using the Django web server, but
>>> I cannot get it to run under Apache and WSGI.
>>>
>>> I have tried everything I can find including building multiple virtual
>>> environments and using two different Ubuntu Servers.
>>>
>>> Please advise what steps I can take to work through the error, and what
>>> information I can provide.
>>>
>>> Here is my Apache Config:
>>>
>>> Alias /static
>>> /home/development/django/ops/ops/opsproj/opsapp/static
>>> <Directory
>>> /home/development/django/ops/ops/opsproj/opsapp/static>
>>> Require all granted
>>> </Directory>
>>>
>>> <Directory /home/development/django/ops/ops/opsproj/opsproj>
>>> <Files wsgi.py>
>>> Require all granted
>>> </Files>
>>> </Directory>
>>> WSGIApplicationGroup %{GLOBAL}
>>> WSGIDaemonProcess opsproj
>>> python-home=/home/development/django/env
>>> python-path=/home/development/django/ops/ops/opsproj
>>> WSGIProcessGroup opsproj
>>> WSGIScriptAlias /
>>> /home/development/django/ops/ops/opsproj/opsproj/wsgi.py
>>>
>>>
>>> Thank you,
>>>
>>> Derek
>>>
>>>
>>>
>>>
>>>
> --
> 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 [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at https://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.