Hello, Any advice would be greatly appreciated!
I have spent countless days and gone through numerous configurations and keep getting the same error: It is a sporadic crash in what appears to be mod_wsgi, resulting in Apache sending a 500 error to my app. I have tried many configurations, but for now, I am running* Ubuntu 15.04, Apache 2.4.10, Web2py 2.13.4, python 2.7.9, and mod_wsgi 4.4.20* I am using mod_wsgi as a traditional Apache module which is what is the way the web2py references doing it and they provide a single script that does it all. If there is a script implementing a deployment recipe for for Web2Py, Ubuntu, and mod_wsgi in Daemon mode that someone can point me to, I'd be happy to give that a try. Here is the crash I get, every few dozen HTTP calls, as well as about 1/3 the time on my first HTTP request after restarting Apache: [Sat Jan 02 03:43:32.984561 2016] [ssl:info] [pid 10916] [client 70.117.108.188:61578] AH01964: Connection to child 4 established (server app.helpmemaybeapp.com:443) [Sat Jan 02 03:43:32.984913 2016] [ssl:debug] [pid 10916] ssl_engine_kernel.c(1908): [client 70.117.108.188:61578] AH02043: SSL virtual host for servername app.helpmemaybeapp.com found [Sat Jan 02 03:43:33.049990 2016] [ssl:debug] [pid 10916] ssl_engine_kernel.c(1841): [client 70.117.108.188:61578] AH02041: Protocol: TLSv1.2, Cipher: ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits) [Sat Jan 02 03:43:33.094826 2016] [ssl:debug] [pid 10916] ssl_engine_kernel.c(243): [client 70.117.108.188:61578] AH02034: Initial (No.1) HTTPS request received for child 4 (server app.helpmemaybeapp.com:443) [Sat Jan 02 03:43:33.094930 2016] [authz_core:debug] [pid 10916] mod_authz_core.c(809): [client 70.117.108.188:61578] AH01626: authorization result of Require all granted: granted [Sat Jan 02 03:43:33.094936 2016] [authz_core:debug] [pid 10916] mod_authz_core.c(809): [client 70.117.108.188:61578] AH01626: authorization result of <RequireAny>: granted [Sat Jan 02 03:43:33.095046 2016] [authz_core:debug] [pid 10916] mod_authz_core.c(809): [client 70.117.108.188:61578] AH01626: authorization result of Require all granted: granted [Sat Jan 02 03:43:33.095051 2016] [authz_core:debug] [pid 10916] mod_authz_core.c(809): [client 70.117.108.188:61578] AH01626: authorization result of <RequireAny>: granted [Sat Jan 02 03:43:33.106285 2016] [wsgi:info] [pid 10911] mod_wsgi (pid=10911): Create interpreter 'app.helpmemaybeapp.com|'. [Sat Jan 02 03:43:33.108183 2016] [wsgi:info] [pid 10911] [remote 70.117.108.188:55237] mod_wsgi (pid=10911, process='web2py', application='app.helpmemaybeapp.com|'): Loading WSGI script '/home/www-data/web2py/wsgihandler.py'. [Sat Jan 02 03:43:33.140272 2016] [wsgi:info] [pid 10927] mod_wsgi (pid=10927): Initializing Python. [Sat Jan 02 03:43:33.153128 2016] [wsgi:info] [pid 10927] mod_wsgi (pid=10927): Attach interpreter ''. [Sat Jan 02 03:43:33.153856 2016] [wsgi:info] [pid 10927] mod_wsgi (pid=10927): Imported 'mod_wsgi'. [Sat Jan 02 03:43:33.611974 2016] [wsgi:error] [pid 10916] [client 70.117.108.188:61578] Truncated or oversized response headers received from daemon process 'web2py': /home/www-data/web2py/wsgihandler.py [Sat Jan 02 03:43:33.612223 2016] [ssl:debug] [pid 10916] ssl_engine_io.c(1003): [client 70.117.108.188:61578] AH02001: Connection closed to child 4 with standard shutdown (server app.helpmemaybeapp.com:443) *[Sat Jan 02 03:43:34.141018 2016] [core:notice] [pid 10907] AH00052: child pid 10911 exit signal Segmentation fault (11)* [Sat Jan 02 03:43:34.141070 2016] [wsgi:info] [pid 10907] mod_wsgi (pid=10911): Process 'web2py' has died, deregister and restart it. [Sat Jan 02 03:43:34.141074 2016] [wsgi:info] [pid 10907] mod_wsgi (pid=10911): Process 'web2py' terminated by signal 11 [Sat Jan 02 03:43:34.141079 2016] [wsgi:info] [pid 10907] mod_wsgi (pid=10911): Process 'web2py' has been deregistered and will no longer be monitored. [Sat Jan 02 03:43:34.141959 2016] [wsgi:info] [pid 10938] mod_wsgi (pid=10938): Starting process 'web2py' with uid=33, gid=33 and threads=1. [Sat Jan 02 03:43:34.142218 2016] [wsgi:info] [pid 10938] mod_wsgi (pid=10938): Initializing Python. [Sat Jan 02 03:43:34.154732 2016] [wsgi:info] [pid 10938] mod_wsgi (pid=10938): Attach interpreter ''. [Sat Jan 02 03:43:34.155490 2016] [wsgi:info] [pid 10938] mod_wsgi (pid=10938): Imported 'mod_wsgi'. [Sat Jan 02 03:43:34.155702 2016] [wsgi:debug] [pid 10938] src/server/mod_wsgi.c(8417): mod_wsgi (pid=10938): Started thread 0 in daemon process 'web2py'. *I am not sure if it help, but here is the output I get when Apache starts:* [Sat Jan 02 03:43:27.095371 2016] [ssl:info] [pid 10905] AH01887: Init: Initializing (virtual) servers for SSL [Sat Jan 02 03:43:27.095429 2016] [ssl:info] [pid 10905] AH01914: Configuring server app.mydomainhere.com:443 for SSL protocol [Sat Jan 02 03:43:27.096048 2016] [ssl:debug] [pid 10905] ssl_engine_init.c(1600): AH02209: CA certificate: CN=Starfield Secure Certificate Authority - G2,OU=http://certs.starfieldtech.com/repository/,O=Starfield Technologies\\, Inc.,L=Scottsdale,ST=Arizona,C=US [Sat Jan 02 03:43:27.096066 2016] [ssl:debug] [pid 10905] ssl_engine_init.c(1600): AH02209: CA certificate: CN=Starfield Root Certificate Authority - G2,O=Starfield Technologies\\, Inc.,L=Scottsdale,ST=Arizona,C=US [Sat Jan 02 03:43:27.096077 2016] [ssl:debug] [pid 10905] ssl_engine_init.c(1600): AH02209: CA certificate: OU=Starfield Class 2 Certification Authority,O=Starfield Technologies\\, Inc.,C=US [Sat Jan 02 03:43:27.096142 2016] [ssl:debug] [pid 10905] ssl_engine_init.c(390): AH01893: Configuring TLS extension handling [Sat Jan 02 03:43:27.096388 2016] [ssl:debug] [pid 10905] ssl_util_ssl.c(343): AH02412: [app.mydomainhere.com:443] Cert matches for name 'app.mydomainhere.com' [subject: CN=app.mydomainhere.com,OU=Domain Control Validated / issuer: CN=Starfield Secure Certificate Authority - G2,OU=http://certs.starfieldtech.com/repository/,O=Starfield Technologies\\, Inc.,L=Scottsdale,ST=Arizona,C=US / serial: FD5FD2A73620E644 / notbefore: Sep 7 05:25:43 2015 GMT / notafter: Sep 7 05:25:43 2016 GMT] [Sat Jan 02 03:43:27.096401 2016] [ssl:info] [pid 10905] AH02568: Certificate and private key app.mydomainhere.com:443:0 configured from /etc/apache2/ssl/fd5fd2b73620e633.crt and /etc/apache2/ssl/mydomainhere.key [Sat Jan 02 03:43:27.096490 2016] [ssl:info] [pid 10905] AH01876: mod_ssl/2.4.10 compiled against Server: Apache/2.4.10, Library: OpenSSL/1.0.1f [Sat Jan 02 03:43:27.126585 2016] [socache_shmcb:debug] [pid 10907] mod_socache_shmcb.c(396): AH00821: shmcb_init allocated 512000 bytes of shared memory [Sat Jan 02 03:43:27.126609 2016] [socache_shmcb:debug] [pid 10907] mod_socache_shmcb.c(412): AH00822: for 511912 bytes (512000 including header), recommending 32 subcaches, 88 indexes each [Sat Jan 02 03:43:27.126612 2016] [socache_shmcb:debug] [pid 10907] mod_socache_shmcb.c(445): AH00824: shmcb_init_memory choices follow [Sat Jan 02 03:43:27.126615 2016] [socache_shmcb:debug] [pid 10907] mod_socache_shmcb.c(447): AH00825: subcache_num = 32 [Sat Jan 02 03:43:27.126618 2016] [socache_shmcb:debug] [pid 10907] mod_socache_shmcb.c(449): AH00826: subcache_size = 15992 [Sat Jan 02 03:43:27.126620 2016] [socache_shmcb:debug] [pid 10907] mod_socache_shmcb.c(451): AH00827: subcache_data_offset = 2128 [Sat Jan 02 03:43:27.126623 2016] [socache_shmcb:debug] [pid 10907] mod_socache_shmcb.c(453): AH00828: subcache_data_size = 13864 [Sat Jan 02 03:43:27.126625 2016] [socache_shmcb:debug] [pid 10907] mod_socache_shmcb.c(455): AH00829: index_num = 88 [Sat Jan 02 03:43:27.126701 2016] [socache_shmcb:info] [pid 10907] AH00830: Shared memory socache initialised [Sat Jan 02 03:43:27.126705 2016] [ssl:info] [pid 10907] AH01887: Init: Initializing (virtual) servers for SSL [Sat Jan 02 03:43:27.126709 2016] [ssl:info] [pid 10907] AH01914: Configuring server app.mydomainhere.com:443 for SSL protocol [Sat Jan 02 03:43:27.127363 2016] [ssl:debug] [pid 10907] ssl_engine_init.c(1600): AH02209: CA certificate: CN=Starfield Secure Certificate Authority - G2,OU=http://certs.starfieldtech.com/repository/,O=Starfield Technologies\\, Inc.,L=Scottsdale,ST=Arizona,C=US [Sat Jan 02 03:43:27.127381 2016] [ssl:debug] [pid 10907] ssl_engine_init.c(1600): AH02209: CA certificate: CN=Starfield Root Certificate Authority - G2,O=Starfield Technologies\\, Inc.,L=Scottsdale,ST=Arizona,C=US [Sat Jan 02 03:43:27.127392 2016] [ssl:debug] [pid 10907] ssl_engine_init.c(1600): AH02209: CA certificate: OU=Starfield Class 2 Certification Authority,O=Starfield Technologies\\, Inc.,C=US [Sat Jan 02 03:43:27.127444 2016] [ssl:debug] [pid 10907] ssl_engine_init.c(390): AH01893: Configuring TLS extension handling [Sat Jan 02 03:43:27.127649 2016] [ssl:debug] [pid 10907] ssl_util_ssl.c(343): AH02412: [app.mydomainhere.com:443] Cert matches for name 'app.mydomainhere.com' [subject: CN=app.mydomainhere.com,OU=Domain Control Validated / issuer: CN=Starfield Secure Certificate Authority - G2,OU=http://certs.starfieldtech.com/repository/,O=Starfield Technologies\\, Inc.,L=Scottsdale,ST=Arizona,C=US / serial: FD5FD2A73620E644 / notbefore: Sep 7 05:25:43 2015 GMT / notafter: Sep 7 05:25:43 2016 GMT] [Sat Jan 02 03:43:27.127661 2016] [ssl:info] [pid 10907] AH02568: Certificate and private key app.mydomainhere.com:443:0 configured from /etc/apache2/ssl/fd5fd2b73620e633.crt and /etc/apache2/ssl/mydomainhere.key [Sat Jan 02 03:43:27.127750 2016] [ssl:info] [pid 10907] AH01876: mod_ssl/2.4.10 compiled against Server: Apache/2.4.10, Library: OpenSSL/1.0.1f [Sat Jan 02 03:43:27.127975 2016] [wsgi:debug] [pid 10907] src/server/mod_wsgi.c(7804): mod_wsgi (pid=10907): Socket for 'web2py' is '/var/run/apache2/wsgi.10907.0.1.sock'. [Sat Jan 02 03:43:27.128001 2016] [wsgi:debug] [pid 10907] src/server/mod_wsgi.c(7862): mod_wsgi (pid=10907): Listen backlog for socket '/var/run/apache2/wsgi.10907.0.1.sock' is '100'. [Sat Jan 02 03:43:27.128718 2016] [wsgi:info] [pid 10911] mod_wsgi (pid=10911): Starting process 'web2py' with uid=33, gid=33 and threads=1. [Sat Jan 02 03:43:27.129010 2016] [wsgi:info] [pid 10911] mod_wsgi (pid=10911): Initializing Python. [Sat Jan 02 03:43:27.131354 2016] [wsgi:info] [pid 10914] mod_wsgi (pid=10914): Initializing Python. [Sat Jan 02 03:43:27.132753 2016] [wsgi:info] [pid 10912] mod_wsgi (pid=10912): Initializing Python. [Sat Jan 02 03:43:27.132790 2016] [mpm_prefork:notice] [pid 10907] AH00163: Apache/2.4.10 (Ubuntu) OpenSSL/1.0.1f mod_wsgi/4.4.20 Python/2.7.9 configured -- resuming normal operations [Sat Jan 02 03:43:27.132839 2016] [mpm_prefork:info] [pid 10907] AH00164: Server built: Jul 24 2015 17:25:18 [Sat Jan 02 03:43:27.132852 2016] [core:notice] [pid 10907] AH00094: Command line: '/usr/sbin/apache2' [Sat Jan 02 03:43:27.132857 2016] [mpm_prefork:debug] [pid 10907] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem) [Sat Jan 02 03:43:27.133311 2016] [wsgi:info] [pid 10916] mod_wsgi (pid=10916): Initializing Python. [Sat Jan 02 03:43:27.136779 2016] [wsgi:info] [pid 10915] mod_wsgi (pid=10915): Initializing Python. [Sat Jan 02 03:43:27.144725 2016] [wsgi:info] [pid 10913] mod_wsgi (pid=10913): Initializing Python. [Sat Jan 02 03:43:27.146755 2016] [wsgi:info] [pid 10916] mod_wsgi (pid=10916): Attach interpreter ''. [Sat Jan 02 03:43:27.147500 2016] [wsgi:info] [pid 10916] mod_wsgi (pid=10916): Imported 'mod_wsgi'. [Sat Jan 02 03:43:27.154216 2016] [wsgi:info] [pid 10911] mod_wsgi (pid=10911): Attach interpreter ''. [Sat Jan 02 03:43:27.155022 2016] [wsgi:info] [pid 10911] mod_wsgi (pid=10911): Imported 'mod_wsgi'. [Sat Jan 02 03:43:27.156050 2016] [wsgi:info] [pid 10912] mod_wsgi (pid=10912): Attach interpreter ''. [Sat Jan 02 03:43:27.156154 2016] [wsgi:info] [pid 10914] mod_wsgi (pid=10914): Attach interpreter ''. [Sat Jan 02 03:43:27.156930 2016] [wsgi:info] [pid 10914] mod_wsgi (pid=10914): Imported 'mod_wsgi'. [Sat Jan 02 03:43:27.157172 2016] [wsgi:debug] [pid 10911] src/server/mod_wsgi.c(8417): mod_wsgi (pid=10911): Started thread 0 in daemon process 'web2py'. [Sat Jan 02 03:43:27.157795 2016] [wsgi:info] [pid 10912] mod_wsgi (pid=10912): Imported 'mod_wsgi'. [Sat Jan 02 03:43:27.158116 2016] [wsgi:info] [pid 10915] mod_wsgi (pid=10915): Attach interpreter ''. [Sat Jan 02 03:43:27.158840 2016] [wsgi:info] [pid 10915] mod_wsgi (pid=10915): Imported 'mod_wsgi'. [Sat Jan 02 03:43:27.164420 2016] [wsgi:info] [pid 10913] mod_wsgi (pid=10913): Attach interpreter ''. [Sat Jan 02 03:43:27.165117 2016] [wsgi:info] [pid 10913] mod_wsgi (pid=10913): Imported 'mod_wsgi'. Thank you! -Mike -- 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.
