You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Geoff Millikan <gm...@t1shopper.com> on 2010/04/21 19:00:11 UTC

[users@httpd] mod_disk_cache causing corrupted output on server side includes?

Dear List,

You can see the corrupted/binary garbled mess on the page at the link here:
http://www.t1shopper.com/tools/calculate/index.shtml

The scrambled mess is outputted right at the server side include like this:
<!--#include virtual="/tools/calculate/filesizedescription.html" -->	

Everything else on the page looks fine, it's only the included file that's mangled like this:
í\énÛHþÜ|á]åâu?-SìA½¡!ŸÄoÿ›IÅÇsØß'±"’ÿ ¼ñ*dLXúIpV.n§Œ ©äÉb®H&Ùˆð˜I

If you look at the same page at the link below, everything is fine.
http://www.t1shopper.com/tools/calculate/

If I restart Apache, the problem remains but if I delete the disk_cache the problem goes away.
shell> rm -rf /var/httpd/proxy/*

Why is mod_disk_cache screwing this include up?

Thanks,

http://www.t1shopper.com/


CacheRoot /var/httpd/proxy/
CacheEnable disk /
CacheDisable /i
CacheMaxFileSize 500000
CacheMinFileSize 1000
CacheDirLevels 2
CacheDirLength 2
CacheIgnoreCacheControl Off
CacheIgnoreNoLastMod On
CacheIgnoreHeaders Set-Cookie
CacheLastModifiedFactor 0.1
CacheMaxExpire 172800
CacheDefaultExpire 86400

RE: [users@httpd] mod_disk_cache causing corrupted output on server side includes?

Posted by Geoff Millikan <gm...@t1shopper.com>.
It's a bummer not to be able to use mod_disk_cache, it's such a good tool.
Would love a solution on this.

> -----Original Message-----
> Sent: Friday, June 11, 2010 8:50 AM
> To: users@httpd.apache.org
> Subject: RE: [users@httpd] mod_disk_cache causing corrupted 
> output on server side includes?
> 
> > Interesting... what other modules did you load?  Looking for 
> > possible sources of memory corruption.
> 
> Why memory corruption?  Everything is being served from disk...
>  
> > The uncached results to the client, they are ok?  
> 
> Yes.
> 
> > E.g. is the cache polluted on the way in, 
> > or on the way out?  Simulated load would 
> > help determine this.
> 
> Just the pages in cache are bad.  The whole page isn't bad, 
> just the section
> where the server-side-include should be (see screenshot):
> https://issues.apache.org/bugzilla/attachment.cgi?id=25524
> 
> Thanks,
> 
> Geoff Millikan
> 
> "Most people say that is it is the intellect which makes a 
> great scientist.
> They are wrong: it is character." -Albert Einstein
> 
> "If you can't explain it simply, you don't understand it well enough"
> -Albert Einstein
> 
> 

RE: [users@httpd] mod_disk_cache causing corrupted output on server side includes?

Posted by Geoff Millikan <gm...@t1shopper.com>.
> Interesting... what other modules did you load?  Looking for 
> possible sources of memory corruption.

Why memory corruption?  Everything is being served from disk...
 
> The uncached results to the client, they are ok?  

Yes.

> E.g. is the cache polluted on the way in, 
> or on the way out?  Simulated load would 
> help determine this.

Just the pages in cache are bad.  The whole page isn't bad, just the section
where the server-side-include should be (see screenshot):
https://issues.apache.org/bugzilla/attachment.cgi?id=25524

Thanks,

Geoff Millikan

"Most people say that is it is the intellect which makes a great scientist.
They are wrong: it is character." -Albert Einstein

"If you can't explain it simply, you don't understand it well enough"
-Albert Einstein


Re: [users@httpd] mod_disk_cache causing corrupted output on server side includes?

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 6/10/2010 4:00 PM, Geoff Millikan wrote:
>>> Just in case your filesystem doesn't support them, have you tried
>>> disabling sendfile and mmap?
>>
>> Since all our files are being read directly off the drive 
>> (we're not using a NFS or CIFS mount) this shouldn't 
>> be an issue (at least on RedHat Enterprise
>> Linux).  But we'll give it a shot and report back.
> 
> Nope, that didn't help.  Within 2 hours the *.shtml web pages have binary
> data where the server side includes should be.  The cache worked great for
> the first 90 minutes or so.

Interesting... what other modules did you load?  Looking for possible sources
of memory corruption.

The uncached results to the client, they are ok?  E.g. is the cache polluted
on the way in, or on the way out?  Simulated load would help determine this.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] mod_disk_cache causing corrupted output on server side includes?

Posted by Geoff Millikan <gm...@t1shopper.com>.
> > Just in case your filesystem doesn't support them, have you tried
> > disabling sendfile and mmap?
> 
> Since all our files are being read directly off the drive 
> (we're not using a NFS or CIFS mount) this shouldn't 
> be an issue (at least on RedHat Enterprise
> Linux).  But we'll give it a shot and report back.

Nope, that didn't help.  Within 2 hours the *.shtml web pages have binary
data where the server side includes should be.  The cache worked great for
the first 90 minutes or so.

Bug report untouched after 7 days:
https://issues.apache.org/bugzilla/show_bug.cgi?id=49385


RE: [users@httpd] mod_disk_cache causing corrupted output on server side includes?

Posted by Geoff Millikan <gm...@t1shopper.com>.
> Just in case your filesystem doesn't support them, have you tried
> disabling sendfile and mmap?

Since all our files are being read directly off the drive (we're not using a
NFS or CIFS mount) this shouldn't be an issue (at least on RedHat Enterprise
Linux).  But we'll give it a shot and report back.

http://kbase.redhat.com/faq/docs/DOC-4857

Maybe the issue is htcacheclean is corrupting the included files?  Nope.  We
turned it off and still had the problem.  Maybe the corruption is happening
when the cache is getting rebuilt (because CacheMaxExpire or
CacheLastModifiedFactor had been exceeded).  Nope.  We set everything very
high (CacheDefaultExpire 2592000 and CacheLastModifiedFactor 30) so that the
first cached page would be preserved and not altered (the initial cached
page is not corrupted) however within a few hours the server side include
pages served out of the cache had binary data in them again.  It's
impossible to trace when the corruption is happening and what's causing it.
So mod_disk_cache is not useable for us, we've had to turn it off.

Re: [users@httpd] mod_disk_cache causing corrupted output on server side includes?

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 6/9/2010 7:14 PM, Geoff Millikan wrote:
> Submitted bug report 6 days ago but no movement.  Tips?

Just in case your filesystem doesn't support them, have you tried
disabling sendfile and mmap?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] mod_disk_cache causing corrupted output on server side includes?

Posted by Geoff Millikan <gm...@t1shopper.com>.
Submitted bug report 6 days ago but no movement.  Tips?

https://issues.apache.org/bugzilla/show_bug.cgi?id=49385

Thanks!
 

> -----Original Message-----
> From: Geoff Millikan
> Sent: Thursday, June 03, 2010 2:25 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] mod_disk_cache causing corrupted 
> output on server side includes?
> 
> Dear List,
> 
> It appears that when mod_disk_cache reads server side 
> includes to create its final cached web page, it sometimes 
> corrupts the included file.
> 
> I think the issue may be that the included file is getting 
> DEFLATEd and Apache is intermittently forgetting to ungzip it 
> prior to putting it into the parent page.
> 
> Any other thoughts?
> 
> Thanks,
> 
> http://www.t1shopper.com/
> 
> Details: The parent web page is called "index.shtml" and the 
> child file is getting included like this:
> <!--#include virtual="/dir/include/my_html_file.html" -->
> 
> Everything else on the page looks fine but where the 
> my_html_file.html should be we see binary output in the 
> source code like this:
> í\énÛHþÜ|á]åâu?-SìA½¡!ŸÄoÿ›IÅÇsØß'±"’ÿ ¼ñ*dLXúIpV.n§Œ 
> ©äÉb®H&Ùˆð˜I
> 
> If I restart Apache, the problem remains. But the problem 
> goes away if I delete the cache on the web server. So the 
> cache must have gotten corrupted. I can refresh the page many 
> times after that and the page is fine. This good page is kept 
> in cache for about 30 days because of the config settings (below).
> 
> 
> LoadModule deflate_module modules/mod_deflate.so
> DeflateCompressionLevel 1
> DeflateMemLevel 9
> DeflateWindowSize 15
> SetEnvIfNoCase Request_URI \
> \.(?:gif|jpe?g|png|ico)$ no-gzip dont-vary
> #Header append Vary User-Agent env=!dont-vary
> 
> 
> LoadModule disk_cache_module modules/mod_disk_cache.so
> CacheRoot /var/httpd/proxy/
> CacheEnable disk /
> CacheDisable /i
> CacheMaxFileSize 500000
> CacheMinFileSize 1000
> CacheDirLevels 2
> CacheDirLength 2
> CacheIgnoreCacheControl Off
> CacheIgnoreNoLastMod On
> CacheIgnoreHeaders Set-Cookie
> CacheLastModifiedFactor 0.1
> CacheMaxExpire 172800
> CacheDefaultExpire 86400 
> 
> http://mail-archives.apache.org/mod_mbox/httpd-users/201004.mbox/%3C9E388FA64DD04B3591A47DD9847026E1@rabbithill%3E
> 
> 
> 

[users@httpd] mod_disk_cache causing corrupted output on server side includes?

Posted by Geoff Millikan <gm...@t1shopper.com>.
Dear List,

It appears that when mod_disk_cache reads server side includes to create its final cached web page, it sometimes corrupts the included file.

I think the issue may be that the included file is getting DEFLATEd and Apache is intermittently forgetting to ungzip it prior to putting it into the parent page.

Any other thoughts?

Thanks,

http://www.t1shopper.com/

Details: The parent web page is called "index.shtml" and the child file is getting included like this:
<!--#include virtual="/dir/include/my_html_file.html" -->

Everything else on the page looks fine but where the my_html_file.html should be we see binary output in the source code like this:
í\énÛHþÜ|á]åâu?-SìA½¡!ŸÄoÿ›IÅÇsØß'±"’ÿ ¼ñ*dLXúIpV.n§Œ ©äÉb®H&Ùˆð˜I

If I restart Apache, the problem remains. But the problem goes away if I delete the cache on the web server. So the cache must have gotten corrupted. I can refresh the page many times after that and the page is fine. This good page is kept in cache for about 30 days because of the config settings (below).


LoadModule deflate_module modules/mod_deflate.so
DeflateCompressionLevel 1
DeflateMemLevel 9
DeflateWindowSize 15
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|ico)$ no-gzip dont-vary
#Header append Vary User-Agent env=!dont-vary


LoadModule disk_cache_module modules/mod_disk_cache.so
CacheRoot /var/httpd/proxy/
CacheEnable disk /
CacheDisable /i
CacheMaxFileSize 500000
CacheMinFileSize 1000
CacheDirLevels 2
CacheDirLength 2
CacheIgnoreCacheControl Off
CacheIgnoreNoLastMod On
CacheIgnoreHeaders Set-Cookie
CacheLastModifiedFactor 0.1
CacheMaxExpire 172800
CacheDefaultExpire 86400 

http://mail-archives.apache.org/mod_mbox/httpd-users/201004.mbox/%3C9E388FA64DD04B3591A47DD9847026E1@rabbithill%3E



Re: [users@httpd] mod_disk_cache causing corrupted output on server side includes?

Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Apr 21, 2010 at 1:00 PM, Geoff Millikan <gm...@t1shopper.com> wrote:
> You can see the corrupted/binary garbled mess on the page at the link here:
> http://www.t1shopper.com/tools/calculate/index.shtml
>
> The scrambled mess is outputted right at the server side include like this:
> <!--#include virtual="/tools/calculate/filesizedescription.html" -->
>
> Everything else on the page looks fine, it's only the included file that's mangled like this:
>  í\énÛH þ Ü|á]åâu?- SìA½¡!ŸÄoÿ›IÅÇsØß '±"’ÿ  ¼ñ*dL XúIp V.n§Œ ©ä Éb®H&Ùˆð˜ I
>
> If you look at the same page at the link below, everything is fine.
> http://www.t1shopper.com/tools/calculate/
>
> If I restart Apache, the problem remains but if I delete the disk_cache the problem goes away.
> shell> rm -rf /var/httpd/proxy/*
>
> Why is mod_disk_cache screwing this include up?

I don't think this is a configuration issue; open a bug report at
https://issues.apache.org/bugzilla/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org