You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Pavel Mateja <pa...@netsafe.cz> on 2007/05/31 12:39:40 UTC
[users@httpd] Mod_proxy problem in 2.2.4
Hey!
I have problem with mod_proxy in apache 2.2.4.
I got wrong data In cca 1 request of 1000 via my proxy apache.
There is end of another page requested by someone else at begin of page
requested by me.
It's like
HTTP/1.0 200 OK
..generated HTTP header - we are using UTF-8 almost everywhere..
Content-Type: text/plain
id="login">Login to
..end of different page..
</body>
</html>
HTTP/1.1 200 OK
..header of requested page..
Content-Type: text/html; charset=UTF-8
f91
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
..requsted page..
Had anybody seen such problem?
It's related with mod_cache_mem because I was uable to replicate it without
mod_cache_mem compiled in.
Thanks
--
Pavel Mateja
---------------------------------------------------------------------
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_proxy problem in 2.2.4
Posted by Pavel Mateja <pa...@netsafe.cz>.
> If you don't have enough memory for the OS to maintain the important
> stuff in the buffer cache, then mem_cache isn't going to help because
> it will just shove other important stuff out of memory and onto disk.
Yes, it is. But it's quite diffucult to explain why without detailed
description of our application.
Some of our proxies have dead disks already and they are still in production
just because they don't need disk at all. We can't replace broken disks by
ourselfs cuz they are not on same continent we are and ISPs are bunch of
lamers.
Memory cache is working and saving significant traffic (money) to our main
site.
Part of page I got is plain HTML and mem cache is enabled just for images.
Sending parts of cached pages which should not be cached at all to another
users is definitely security flaw and should be fixed.
--
Pavel Mateja
---------------------------------------------------------------------
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_proxy problem in 2.2.4
Posted by Joshua Slive <jo...@slive.ca>.
On 5/31/07, Pavel Mateja <pa...@netsafe.cz> wrote:
> > But the disk cache often has better performance than the memory cache
> > even on a normal disk. There are two reasons for this:
> >
> > 1. The disk cache is shared between all processes, while the mem cache
> > must keep copies of each object for each processes.
> >
> > 2. The disk cache takes full advantage of your OSes buffer caches and
> > zero-copy networking. If you have enough memory, then frequently
> > accessed stuff from the disk cache is going to be kept in memory by
> > your OS. And instead of apache having to handle all the
> > synchronization itself, it will all be handled in the kernel where it
> > is the most efficient.
>
> I know all of this. But our application has cca 10M hits per day per proxy and
> we are trying to cache cca 3GB of images in 200MB of RAM (rest of 1GB is
> consumed by apache and iptables) to save some traffic. No harddisk known to
> me can really handle this.
Some definite miscommunication going on here.
The hard disk doesn't need to handle it, because any
frequently-requested object is going to wind up in the OS buffer cache
(in memory). If you used mem_cache, performance could be worse because
you'll have many copies of the same object in memory (one for each
process) whereas with disk_cache, the OS is smart enough to maintain
just one copy.
If you don't have enough memory for the OS to maintain the important
stuff in the buffer cache, then mem_cache isn't going to help because
it will just shove other important stuff out of memory and onto disk.
Joshua.
---------------------------------------------------------------------
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_proxy problem in 2.2.4
Posted by Pavel Mateja <pa...@netsafe.cz>.
> But the disk cache often has better performance than the memory cache
> even on a normal disk. There are two reasons for this:
>
> 1. The disk cache is shared between all processes, while the mem cache
> must keep copies of each object for each processes.
>
> 2. The disk cache takes full advantage of your OSes buffer caches and
> zero-copy networking. If you have enough memory, then frequently
> accessed stuff from the disk cache is going to be kept in memory by
> your OS. And instead of apache having to handle all the
> synchronization itself, it will all be handled in the kernel where it
> is the most efficient.
I know all of this. But our application has cca 10M hits per day per proxy and
we are trying to cache cca 3GB of images in 200MB of RAM (rest of 1GB is
consumed by apache and iptables) to save some traffic. No harddisk known to
me can really handle this.
--
Pavel Mateja
---------------------------------------------------------------------
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_proxy problem in 2.2.4
Posted by Joshua Slive <jo...@slive.ca>.
On 5/31/07, Pavel Mateja <pa...@netsafe.cz> wrote:
> On Thursday 31 of May 2007 15:32:43 Joshua Slive wrote:
> > Yes, it is likely a mod_mem_cache problem. Try using the disk cache
> > instead. It is better tested, and likely just as performant as the mem
> > cache in most circumstances.
>
> Unfortunatelly it's not an option for us.
> We have to use some sort of cache and we won't to use disk for it.
> Maybe we will try disk cache on ram disk or such hack.
You can do disk cache on ram disk if you want.
But the disk cache often has better performance than the memory cache
even on a normal disk. There are two reasons for this:
1. The disk cache is shared between all processes, while the mem cache
must keep copies of each object for each processes.
2. The disk cache takes full advantage of your OSes buffer caches and
zero-copy networking. If you have enough memory, then frequently
accessed stuff from the disk cache is going to be kept in memory by
your OS. And instead of apache having to handle all the
synchronization itself, it will all be handled in the kernel where it
is the most efficient.
Joshua.
---------------------------------------------------------------------
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_proxy problem in 2.2.4
Posted by Pavel Mateja <pa...@netsafe.cz>.
On Thursday 31 of May 2007 15:32:43 Joshua Slive wrote:
> Yes, it is likely a mod_mem_cache problem. Try using the disk cache
> instead. It is better tested, and likely just as performant as the mem
> cache in most circumstances.
Unfortunatelly it's not an option for us.
We have to use some sort of cache and we won't to use disk for it.
Maybe we will try disk cache on ram disk or such hack.
--
Pavel Mateja
---------------------------------------------------------------------
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_proxy problem in 2.2.4
Posted by Joshua Slive <jo...@slive.ca>.
On 5/31/07, Pavel Mateja <pa...@netsafe.cz> wrote:
> Had anybody seen such problem?
> It's related with mod_cache_mem because I was uable to replicate it without
> mod_cache_mem compiled in.
Yes, it is likely a mod_mem_cache problem. Try using the disk cache
instead. It is better tested, and likely just as performant as the mem
cache in most circumstances.
Joshua.
---------------------------------------------------------------------
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