title: Apache2 and mod_wsgi: Truncated or oversized response headers received from daemon process
body: <p>My application is running with an Apache 2 server using mod_wsgi, Flask, and Python 2.7. Oddly enough, the application crashes when the page refreshes. For me, this happens exactly on every other refresh. You can see it <a href="http://amp.pharm.mssm.edu/g2e/test" rel="nofollow">here</a>. Furthermore, in Chrome, if I open the web inspector tool, the program does <em>not</em> crash.</p>
  
  <p>In the logs, I see:</p>
  
  <pre><code>[Tue Apr 14 13:45:29.137444 2015] [wsgi:error] [pid 32713] [client 146.203.54.32:58816] Truncated or oversized response headers received from daemon process 'localhost:80': /etc/g2e/htdocs/g2e
  [Tue Apr 14 13:45:29.671493 2015] [core:notice] [pid 28845] AH00052: child pid 640 exit signal Segmentation fault (11)
  [Tue Apr 14 13:45:29.671520 2015] [wsgi:info] [pid 28845] mod_wsgi (pid=640): Process 'localhost:80' has died, deregister and restart it.
  [Tue Apr 14 13:45:29.671524 2015] [wsgi:info] [pid 28845] mod_wsgi (pid=640): Process 'localhost:80' terminated by signal 11
  [Tue Apr 14 13:45:29.671527 2015] [wsgi:info] [pid 28845] mod_wsgi (pid=640): Process 'localhost:80' has been deregistered and will no longer be monitored.
  ...
  </code></pre>
  
  <p>FWIW, I am using</p>
  
  <pre><code>Linux 3.16.7-7-desktop #1 SMP PREEMPT Wed Dec 17 18:00:44 UTC 2014 (762f27a) x86_64 x86_64 x86_64 GNU/Linux
  </code></pre>
  
  <p>Any help is appreciated.</p>