[EMAIL PROTECTED] RE : RE : [EMAIL PROTECTED] mod_mem_cache caches incomplete content

2008-04-20 Thread PAILLART Frederic
> In the context of the current state of the mem cache, yes, I do
> consider that a bad idea. The mem cache is not well tested. And in
> addition, on systems with good buffer caches, the disk cache will be
> able to share one memory/buffer cached object across all threads and
> processes and use zero-copy IO (sendfile) to deliver it to the
> network.

OK. So I will try more carefully the disk module.
My production platform will be Linux with 2.6 kernel. 
I hope that Linux kernel buffer caches are able to manage properly objects with 
such big size. 

>>  I'm preparing a patch to correct the mem module bug, and writing a new
>> cache module based on shared memory.
>>  Do you think that such new module will be useful for the community ?

> Possibly. You'd need to show that it actually outperformed the disk
> cache in some scenarios. It's a topic you should definitely bring up
> on the dev list rather than here.

I plan now to perform some benchmarks before to continue my development.

Thanks a lot for your help, Joshua.
Best regards,

Fred


[EMAIL PROTECTED] Memory consumption

2008-04-20 Thread benjamin
Hello,

I'm currently using Apache 2.2 under Debian Etch, with FastCGI/Suexec
and Php5.2 (all of these softwares have been installed as Debian
paquets, using aptitude).

The server is a Pentium 4 (3 Ghz) with 2 Gb of RAM. It serves a lot of
requests (about 30 to 35 per second, mainly weblogs and forums). This
server is only used to run Apache and Proftpd. I recently switched
from Apache 1.3 to Apache 2.2, from php4 to php5 and from Debian Sarge
to Debian Etch (from scratch).
Since this major update I am running into memory consumption problems
with Apache 2 :

CPU load is correct, however memory consumption is really high : some
Apache 2 processes can take up to 10 % of total RAM, which is more or
less equal to 200 Mb :

15641 www-data 20 0 31416 16m 864 S 1 0.8 1:32.64apache2
3673 www-data 20 0 422m 114m 2416 S 0 5.7 0:10.87apache2
4364 www-data 20 0 408m 107m 3076 S 0 5.3 0:10.12apache2
5771 www-data 20 0 599m 207m 2028 S 0 10.3 0:20.58apache2

Here is the result of the "free" command :
-
total used free shared buffers cached
Mem: 2070444 1979116 91328 0 111444 1012000
-/+ buffers/cache: 855672 1214772
Swap: 923696 0 923696

I monitored the used memory (which is given by "-/+ buffers/cache")
and sometimes I noticed peaks to 1.6 Gb (which is really high); it
wasn't the case before the update, with the same traffic load.

Activated modules are :

actions.load authn_file.load authz_host.load bw.load dir.conf
fastcgi.conf negotiation.load status.load
alias.load authz_default.load authz_user.load cgid.conf dir.load
fastcgi.load rewrite.load suexec.load
auth_basic.load authz_groupfile.load autoindex.load cgid.load env.load
mime.load setenvif.load

And here are a few details about the Apache 2 version I'm using :

Server version: Apache/2.2.3
Server built: Jan 27 2008 18:09:58
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 32-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with
-D APACHE_MPM_DIR="server/mpm/worker"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

I really hope some of you will be able to help me, I thank you all in advance.

Have a nice day !

Benjamin SCHILZ
[EMAIL PROTECTED]

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



[EMAIL PROTECTED] Proxy Error

2008-04-20 Thread Parag Dhanuka
Hi all,,

I am using an apache server to act as a load balancer to my tomcat server...

I am using reverse proxy for doing this..
The major lines of change in my http conf are these


ProxyRequests Off


Order deny,allow
Deny from all
Allow from all
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1


ProxyPass /blah http://localhost:8090/blah
ProxyPassReverse  /blah http://localhost:8090/blah

ProxyPass /blah http://localhost:8091/blah
ProxyPassReverse  /blah http://localhost:8091/blah


My tomcat server conf has this line added with other appropriate changes




Now I am getting this error in my server logs which I have no idea as to how
to fix

[Sun Apr 20 03:35:57 2008] [error] [client 66.249.85.88] proxy: error
reading status line from remote server localhost
[Sun Apr 20 03:35:57 2008] [error] [client 66.249.85.88] proxy: Error
reading from remote server returned by blah

As soon as this error comes soon I am bombarded with errors like
(111)Connection refused: proxy: HTTP: attempt to connect to
127.0.0.1:8091(localhost) failed

All tht I get on my webserver is a 500 response I am lost Please
helpI gooogled a lot and added
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1

and also removed keepaliverequest from tomcat. but still I soon ended up
getting into this problem :(

-- 
Parag Dhanuka


[EMAIL PROTECTED] Re: Proxy Error

2008-04-20 Thread Parag Dhanuka
I did a netstat -n and it seems that I am always having arnd 300-400
connections to the port on which tomcat is listening to the proxy

On Sun, Apr 20, 2008 at 6:32 PM, Parag Dhanuka <[EMAIL PROTECTED]>
wrote:

> Hi all,,
>
> I am using an apache server to act as a load balancer to my tomcat
> server...
>
> I am using reverse proxy for doing this..
> The major lines of change in my http conf are these
>
> 
> ProxyRequests Off
>
> 
> Order deny,allow
> Deny from all
> Allow from all
> SetEnv force-proxy-request-1.0 1
> SetEnv proxy-nokeepalive 1
> 
>
> ProxyPass /blah http://localhost:8090/blah
> ProxyPassReverse  /blah http://localhost:8090/blah
>
> ProxyPass /blah http://localhost:8091/blah
> ProxyPassReverse  /blah http://localhost:8091/blah
>
>
> My tomcat server conf has this line added with other appropriate changes
>
>  className="org.apache.catalina.connector.http.HttpConnector" port="8091"
>maxKeepAliveRequests="1" protocol="HTTP/1.1"
>proxyPort="80"/>
>
>
> Now I am getting this error in my server logs which I have no idea as to
> how to fix
>
> [Sun Apr 20 03:35:57 2008] [error] [client 66.249.85.88] proxy: error
> reading status line from remote server localhost
> [Sun Apr 20 03:35:57 2008] [error] [client 66.249.85.88] proxy: Error
> reading from remote server returned by blah
>
> As soon as this error comes soon I am bombarded with errors like
> (111)Connection refused: proxy: HTTP: attempt to connect to 
> 127.0.0.1:8091(localhost) failed
>
> All tht I get on my webserver is a 500 response I am lost Please
> helpI gooogled a lot and added
> SetEnv force-proxy-request-1.0 1
> SetEnv proxy-nokeepalive 1
>
> and also removed keepaliverequest from tomcat. but still I soon ended up
> getting into this problem :(
>
> --
> Parag Dhanuka




-- 
Parag Dhanuka


Re: [EMAIL PROTECTED] Memory consumption

2008-04-20 Thread Joshua Slive
On Sun, Apr 20, 2008 at 6:24 AM, benjamin <[EMAIL PROTECTED]> wrote:
> Hello,
>
>  I'm currently using Apache 2.2 under Debian Etch, with FastCGI/Suexec
>  and Php5.2 (all of these softwares have been installed as Debian
>  paquets, using aptitude).
>
>  The server is a Pentium 4 (3 Ghz) with 2 Gb of RAM. It serves a lot of
>  requests (about 30 to 35 per second, mainly weblogs and forums). This
>  server is only used to run Apache and Proftpd. I recently switched
>  from Apache 1.3 to Apache 2.2, from php4 to php5 and from Debian Sarge
>  to Debian Etch (from scratch).
>  Since this major update I am running into memory consumption problems
>  with Apache 2 :

It's highly unlikely that this comes from apache or its core modules.
It is probably something in your php code or libraries.

One way to try to isolate the problem is to add the PID to your apache
access log. Then you can try to quickly identify processes that
balloon in size and track backward in the log to find requests that
could be causing it.

Joshua.

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



Re: [EMAIL PROTECTED] Memory consumption

2008-04-20 Thread Sean Conner
It was thus said that the Great benjamin once stated:
> Hello,
> 
> I'm currently using Apache 2.2 under Debian Etch, with FastCGI/Suexec
> and Php5.2 (all of these softwares have been installed as Debian
> paquets, using aptitude).
> 
> CPU load is correct, however memory consumption is really high : some
> Apache 2 processes can take up to 10 % of total RAM, which is more or
> less equal to 200 Mb :
> 
> And here are a few details about the Apache 2 version I'm using :
> 
> Server version: Apache/2.2.3
> Server built: Jan 27 2008 18:09:58
> Server's Module Magic Number: 20051115:3
> Server loaded: APR 1.2.7, APR-Util 1.2.7
> Compiled using: APR 1.2.7, APR-Util 1.2.7
> Architecture: 32-bit
> Server MPM: Worker
> threaded: yes (fixed thread count)
> forked: yes (variable process count)

  I recently discovered that pthreads (the threading library used on most
Unix systems, including Linux) uses the process limit for the stack for each
thread it creates.  You can check this value under Linux by running the
command "ulimit -s" at the command line.  

[spc]lucy:~>ulimit -s
10240
[spc]lucy:~>

  The value returned is in kilobytes, so the default stack size on my system
(CentOS) is 10M (and for a recent project I worked on, that explained why
the memory consumption was ridiculously huge---the program created a bunch
of threads).  

  You can decrease the amount of stack space by running the above command
with a value:

[spc]lucy:~>ulimit -s 128 # set maximum stack size to 128K

  but be warned that pthreads will use a minimum amount of stackspace (it
checks if the process limit is too small, and if so, will use its minimum
size).  This size is anywhere from 16k to 128k, depending upon the platform. 
Also, setting the stack to a smaller value *may* cause Apache to crash (the
reason why a 10M stack segment isn't a problem is that the statck grows
on the fly as the program is running; pthreads can't do that for thread
stacks and has to allocate the memory when the thread is created).

  -spc 


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



[EMAIL PROTECTED] silent URL redirect/cloak with mod_rewrite

2008-04-20 Thread Hank
Hello All,

I've tried about 100 combinations and searched google over and over, but I
can't find nor figure out how to do this simple task.

I have one webserver with sites at:

/home/user/public_html/  ( http://basedomain.com site points here)
/home/user/public_html/siteA
/home/user/public_html/siteB

I have domain names like this:  http://domainA.com  and
http://domainB.com 

I want to *silently* redirect http://domainA.com  to
/home/user/public_html/siteA
and http://domainB.com  to
/home/user/public_html/siteB

Now keep in mind the literals "domainA" is not the same as the directory
name "siteA", and same for domainA/siteA.

I have found several ways to non-silently redirect
http://domainA.comto
http://basedomain/siteA, but that's not good enough.  It needs to be a
silent re-direct.

I realize I could do this with virtual domains if I had access to
httpd.conf, but I don't on this server.

Thanks,
-Hank


[EMAIL PROTECTED] Re: Proxy Error

2008-04-20 Thread Parag Dhanuka
Please help someone... The problem is happening every 3 hrs on a live server
:( I have writen some script to handle this but cannot really sleep till
this is fix

Besides I also tried connecting locally to the tomcat instance using wget
localhost:8091 and interestingly the wget just hung without any response
from tomcat Is this some weird tomcat issue which I cannot look into
It is not tht my instance is heavily loaded as it happened also at a time
when traffic was really very low :(

Parag.

On Sun, Apr 20, 2008 at 6:51 PM, Parag Dhanuka <[EMAIL PROTECTED]>
wrote:

> I did a netstat -n and it seems that I am always having arnd 300-400
> connections to the port on which tomcat is listening to the proxy
>
>
> On Sun, Apr 20, 2008 at 6:32 PM, Parag Dhanuka <[EMAIL PROTECTED]>
> wrote:
>
> > Hi all,,
> >
> > I am using an apache server to act as a load balancer to my tomcat
> > server...
> >
> > I am using reverse proxy for doing this..
> > The major lines of change in my http conf are these
> >
> > 
> > ProxyRequests Off
> >
> > 
> > Order deny,allow
> > Deny from all
> > Allow from all
> > SetEnv force-proxy-request-1.0 1
> > SetEnv proxy-nokeepalive 1
> > 
> >
> > ProxyPass /blah http://localhost:8090/blah
> > ProxyPassReverse  /blah http://localhost:8090/blah
> >
> > ProxyPass /blah http://localhost:8091/blah
> > ProxyPassReverse  /blah http://localhost:8091/blah
> >
> >
> > My tomcat server conf has this line added with other appropriate changes
> >
> >  > className="org.apache.catalina.connector.http.HttpConnector" port="8091"
> >maxKeepAliveRequests="1" protocol="HTTP/1.1"
> >proxyPort="80"/>
> >
> >
> > Now I am getting this error in my server logs which I have no idea as to
> > how to fix
> >
> > [Sun Apr 20 03:35:57 2008] [error] [client 66.249.85.88] proxy: error
> > reading status line from remote server localhost
> > [Sun Apr 20 03:35:57 2008] [error] [client 66.249.85.88] proxy: Error
> > reading from remote server returned by blah
> >
> > As soon as this error comes soon I am bombarded with errors like
> > (111)Connection refused: proxy: HTTP: attempt to connect to
> > 127.0.0.1:8091 (localhost) failed
> >
> > All tht I get on my webserver is a 500 response I am lost Please
> > helpI gooogled a lot and added
> > SetEnv force-proxy-request-1.0 1
> > SetEnv proxy-nokeepalive 1
> >
> > and also removed keepaliverequest from tomcat. but still I soon ended up
> > getting into this problem :(
> >
> > --
> > Parag Dhanuka
>
>
>
>
> --
> Parag Dhanuka




-- 
Parag Dhanuka


AW: [EMAIL PROTECTED] silent URL redirect/cloak with mod_rewrite

2008-04-20 Thread christian.folini
Hey Hank,
 
What do you mean by "silent redirect"?
 
Christian



Von: Hank [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 21. April 2008 01:43
An: users@httpd.apache.org
Betreff: [EMAIL PROTECTED] silent URL redirect/cloak with mod_rewrite


Hello All,
 
I've tried about 100 combinations and searched google over and over, but
I can't find nor figure out how to do this simple task.
 
I have one webserver with sites at:
 
/home/user/public_html/  ( http://basedomain.com
  site points here) 
/home/user/public_html/siteA
/home/user/public_html/siteB
 
I have domain names like this:  http://domainA.com 
and http://domainB.com   
 
I want to *silently* redirect http://domainA.com 
to  /home/user/public_html/siteA 
and http://domainB.com   to
/home/user/public_html/siteB
 
Now keep in mind the literals "domainA" is not the same as the directory
name "siteA", and same for domainA/siteA.
 
I have found several ways to non-silently redirect http://domainA.com
  to http://basedomain/siteA, but that's not good
enough.  It needs to be a silent re-direct. 
 
I realize I could do this with virtual domains if I had access to
httpd.conf, but I don't on this server.
 
Thanks,
-Hank


[EMAIL PROTECTED] apache does not preserve user session of tomcat

2008-04-20 Thread Melanie Pfefer
hi again,

I am using apache as a reverse proxy to a tomcat server running ssl. In 
httpd.conf:

SSLProxyEngine On
SSLProxyCACertificatePath /usr/local/apache2/conf/ssl
RewriteRule ^/(abc.*) https://backend:8443/$1 [P,L]

and url proxying is working.
however I noticed that the tomcat user session is not preserved. How to 
preserve the user session?

thanks!


  __
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html

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