Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have PHP-FPM setup with Apache 2.4 using proxy_fcgi, all works fine, but every one in 4-6 requests, Apache returns a blank page. This happens on my main site http://danielhe.com/, but not subdomain vhosts.

This shows up Apache's error log, [client x] AH01070: Error parsing script headers

And eventually, sometimes Apache segfaults AH00052: child pid 9740 exit signal Segmentation fault (11)

I can reproduce the "Error parsing script headers" very easily by refreshing the page a couple times, but the seg fault happens randomly after a couple of "Error parsing script headers"

Update I have found a fix for the seg faults, and the WSOD has apparently fixed itself. mod_deflate has some issues, but this config from the Apache documentation fixed it

SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpeg|jpg|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
share|improve this question

migrated from stackoverflow.com Aug 26 '12 at 18:26

This question came from our site for professional and enthusiast programmers.

2  
You should answer your own question and mark it as an accepted answer to make this question looks like a solved one –  regilero May 29 '12 at 12:13

1 Answer 1

The solution was to use this configuration

SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpeg|jpg|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
share|improve this answer
    
Are you sure that problem is in mod_deflate? Any references? Looks very strange... –  GioMac Aug 26 '12 at 19:17
    
@GioMac: I've no idea - the OP says that's what solved the problem in the question. I just put it in an answer. Note that SO sent it to us and it was originally answered on March 9th 2012. –  Iain Aug 26 '12 at 19:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.