Re: [us...@httpd] Apache is slow at accepting connections

2010-02-07 Thread Sandro Tosi

Hello,
we managed to fix this problem by setting:

net.ipv4.tcp_syncookies=1
net.ipv4.tcp_tw_reuse=1

kernel params. tcp_syscookies is enough but since we had several 
connections in TIME_WAIT, we read tcp_tw_reuse helps those be reused 
more efficiently.


HTH,
Sandro

Sandro Tosi wrote:

Hello,
we have a rather busy Apache web server (~200/300 contemporary 
connections). There are time when Apache is really slow at letting 
client connects to it. For example, with curl, I see:


02:05:17.885074 == Info: About to connect() to IP_ADDRESS port 80 (#0)
02:05:17.885280 == Info:   Trying IP_ADDRESS... 02:05:20.898748 == Info: 
connected

02:05:20.898785 == Info: Connected to IP_ADDRESS (IP_ADDRESS) port 80 (#0)
...
02:05:20.917068 == Info: Closing connection #0

and

02:06:53.098230 == Info: About to connect() to IP_ADDRESS port 80 (#0)
02:06:53.099272 == Info:   Trying IP_ADDRESS... 02:07:02.111596 == Info: 
connected

02:07:02.111636 == Info: Connected to IP_ADDRESS (IP_ADDRESS) port 80 (#0)
02:07:02.111731 => Send header, 222 bytes (0xde)
...
02:07:02.422093 == Info: Closing connection #0

as you can see, we see a 3 seconds (first example) and a 9 seconds 
(second example) delay between apache server contact and when the 
connection is actually accepted. The delay is always either 3 or 9 
seconds, that's quite weird and it seems to indicate a sort of 
retry+backoff (3 secs, 3x2 secs (9 secs total) and so on) implemented in 
some Apache layers.


Anyhow, once the client is able to connect to Apache, the request is 
served very fast. Just to be sure it's nothing in the VirtualHosts we've 
setup, we tried also with /server-status but even that page is slow at 
connect.


In addition, sometimes we also see:

02:10:40.651926 == Info: About to connect() to IP_ADDRESS port 80 (#0)
02:10:40.652543 == Info:   Trying IP_ADDRESS... 02:11:00.060879 == Info: 
Connection refused

02:11:00.060924 == Info: couldn't connect to host
02:11:00.060942 == Info: Closing connection #0

as if the client was not able to be served by any Apache server.

The MPM config we use is:

StartServers 200
MinSpareServers 150
MaxSpareServers 300
ServerLimit 2000
MaxClients 2000
MaxRequestsPerChild 100

KeepAlive off

We tried everything that came to our minds to avoid that delay:

- tune the parameters above (StartServer, Min/MaxSpareServer etc)
- only Listen on a single port (inferred from 
http://httpd.apache.org/docs/2.2/misc/perf-tuning.html)
- change every possible AcceptMutex values: flock, fcntl, pthread, and 
sysvsem (the  default)


but none of them helped.

Does anyone know how to solve this problem? If there are other info 
needed, just let me now and I'll provide them.


Thanks in advance,
Sandro

-
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

  



-
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: users-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] mod_proxy_html v3.1.2 fails to install on Solaris10

2010-02-07 Thread Igor Cicimov
Ups my mistake, missed the -i switch in the apxs command...all good now
thanks for your help guys.

Igor

On Mon, Feb 8, 2010 at 4:41 PM, Igor Cicimov  wrote:

> Hi Eric,
>
> This is the output from my last try
>
> /install/software/mod_proxy_html$ /usr/local/apache2/bin/apxs -c
> -I/usr/local/include/libxml2 -I. -a mod_proxy_html.c
> /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic
> -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE
> -g -O2 -I/usr/local/apache2/include  -I/usr/local/apache2/include
> -I/usr/local/apache2/include  -I/usr/local/include/libxml2 -I.  -c -o
> mod_proxy_html.lo mod_proxy_html.c && touch mod_proxy_html.slo
> /usr/local/apache2/build/libtool --silent --mode=link gcc -o
> mod_proxy_html.la  -rpath /usr/local/apache2/modules -module
> -avoid-versionmod_proxy_html.lo
>
> so it looks like the command was successful but no module has been created
> in the modules directory thus the module has not been loaded in the apache
> configuration.
>
> Thanks,
>
> Igor
>
>
> On Mon, Feb 8, 2010 at 4:22 PM, Igor Cicimov  wrote:
>
>> Hi Snader,
>>
>> The file is in the same folder where the mod_proxy binaries are
>>
>> mod_proxy_html/mod_xml2enc.h
>>
>> Igor
>>
>>
>> On Mon, Feb 1, 2010 at 4:34 PM, Sander Temme  wrote:
>>
>>>
>>> On Jan 31, 2010, at 5:19 PM, Igor Cicimov wrote:
>>>
>>> > # /usr/local/apache2/bin/apxs -c -I/usr/local/include/libxml2 -i -a
>>> mod_proxy_html.c
>>> > /usr/local/apache2/build/libtool --silent --mode=compile gcc
>>> -prefer-pic   -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
>>> -D_LARGEFILE64_SOURCE -g -O2 -I/usr/local/apache2/include
>>>  -I/usr/local/apache2/include   -I/usr/local/apache2/include
>>>  -I/usr/local/include/libxml2  -c -o mod_proxy_html.lo mod_proxy_html.c &&
>>> touch mod_proxy_html.slo
>>> > mod_proxy_html.c:66:25: mod_xml2enc.h: No such file or directory
>>>
>>> Where on your system lives mod_xml2enc.h?
>>>
>>> S.
>>>
>>> --
>>> Sander Temme
>>> scte...@apache.org
>>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>>
>>>
>>>
>>>
>>
>


Re: [us...@httpd] mod_proxy_html v3.1.2 fails to install on Solaris10

2010-02-07 Thread Igor Cicimov
Hi Eric,

This is the output from my last try

/install/software/mod_proxy_html$ /usr/local/apache2/bin/apxs -c
-I/usr/local/include/libxml2 -I. -a mod_proxy_html.c
/usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic
-DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE
-g -O2 -I/usr/local/apache2/include  -I/usr/local/apache2/include
-I/usr/local/apache2/include  -I/usr/local/include/libxml2 -I.  -c -o
mod_proxy_html.lo mod_proxy_html.c && touch mod_proxy_html.slo
/usr/local/apache2/build/libtool --silent --mode=link gcc -o
mod_proxy_html.la  -rpath /usr/local/apache2/modules -module
-avoid-versionmod_proxy_html.lo

so it looks like the command was successful but no module has been created
in the modules directory thus the module has not been loaded in the apache
configuration.

Thanks,

Igor

On Mon, Feb 8, 2010 at 4:22 PM, Igor Cicimov  wrote:

> Hi Snader,
>
> The file is in the same folder where the mod_proxy binaries are
>
> mod_proxy_html/mod_xml2enc.h
>
> Igor
>
>
> On Mon, Feb 1, 2010 at 4:34 PM, Sander Temme  wrote:
>
>>
>> On Jan 31, 2010, at 5:19 PM, Igor Cicimov wrote:
>>
>> > # /usr/local/apache2/bin/apxs -c -I/usr/local/include/libxml2 -i -a
>> mod_proxy_html.c
>> > /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic
>>   -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
>> -D_LARGEFILE64_SOURCE -g -O2 -I/usr/local/apache2/include
>>  -I/usr/local/apache2/include   -I/usr/local/apache2/include
>>  -I/usr/local/include/libxml2  -c -o mod_proxy_html.lo mod_proxy_html.c &&
>> touch mod_proxy_html.slo
>> > mod_proxy_html.c:66:25: mod_xml2enc.h: No such file or directory
>>
>> Where on your system lives mod_xml2enc.h?
>>
>> S.
>>
>> --
>> Sander Temme
>> scte...@apache.org
>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>
>>
>>
>>
>


Re: [us...@httpd] mod_proxy_html v3.1.2 fails to install on Solaris10

2010-02-07 Thread Igor Cicimov
Hi Snader,

The file is in the same folder where the mod_proxy binaries are

mod_proxy_html/mod_xml2enc.h

Igor

On Mon, Feb 1, 2010 at 4:34 PM, Sander Temme  wrote:

>
> On Jan 31, 2010, at 5:19 PM, Igor Cicimov wrote:
>
> > # /usr/local/apache2/bin/apxs -c -I/usr/local/include/libxml2 -i -a
> mod_proxy_html.c
> > /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic
>   -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
> -D_LARGEFILE64_SOURCE -g -O2 -I/usr/local/apache2/include
>  -I/usr/local/apache2/include   -I/usr/local/apache2/include
>  -I/usr/local/include/libxml2  -c -o mod_proxy_html.lo mod_proxy_html.c &&
> touch mod_proxy_html.slo
> > mod_proxy_html.c:66:25: mod_xml2enc.h: No such file or directory
>
> Where on your system lives mod_xml2enc.h?
>
> S.
>
> --
> Sander Temme
> scte...@apache.org
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>
>
>
>


Re: [us...@httpd] How to collect host specif error log and how to see those from web interface ?

2010-02-07 Thread J. Bakshi
On 02/08/2010 10:01 AM, Jeremy R. wrote:
>   
>> Actually I am interested to break the error log too with vlogger. But it
>> seems there is no option to do that.
>> 
> Works the same way as the access log. I don't know much about vlogger 
> specifically, but it appears that it accepts log entries over stdin.
>
> In your vhost config:
>
> ErrorLog "| /path/to/vlogger -s error.log /path/to/logs"
>
> Or something along those lines.
>   

Well, I also tried with the same but it didn't work. After flipping the
manual I have found

[...]
Errorlog mode is used when running with an Apache errorlog. In this mode,
virtualhost parsing is disabled, and a single file is written in LOGDIR
using the TEMPLATE (%m%d%Y-error.log is default for -e). When running with
-r, the template becomes %m%d%Y-%T-xxx.log. SIZE is given in bytes.
[]


-- 
জয়দীপ বক্সী


-
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] How to collect host specif error log and how to see those from web interface ?

2010-02-07 Thread Jeremy R.

> Actually I am interested to break the error log too with vlogger. But it
> seems there is no option to do that.

Works the same way as the access log. I don't know much about vlogger 
specifically, but it appears that it accepts log entries over stdin.

In your vhost config:

ErrorLog "| /path/to/vlogger -s error.log /path/to/logs"

Or something along those lines.

> Regarding error log contents, I do
> have shell access, but it would be nice to provide a web interface so
> that the developer can see the errors at least.

I don't know of one specifically, though it wouldn't be difficult to create 
such an interface (by watching log files or receiving entries directly as 
described above, and then pushing them to the user with AJAX or something).

Of course, having your developers do development locally (where they have 
access to the error log) and then pushing working versions to the production 
server is probably not a bad idea, and would minimize the amount of access they 
need to production logs.

-- 
Jeremy R.
Owner, NovaWave Solutions
http://www.novawave.net/


-
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] How to collect host specif error log and how to see those from web interface ?

2010-02-07 Thread J. Bakshi
On 02/08/2010 09:45 AM, Jeremy R. wrote:
>>> [1] how can I break the error log as per vhost ?
>>>
>>> Is it something like
>>>
>>> 
>>>
>>> [...]
>>> ErrorLog /srv/www/htdocs/myvhost_dir/error.log
>>> LogLevel error
>>> [...]
>>>
>>> 
>>>   
> Yes, it's exactly that. Just use the ErrorLog directive within your vhost. 
> (P.S. Putting your error log inside your DocumentRoot is probably not a good 
> idea as you generally don't want that to be visible to the world. At the very 
> least, configure it not to be accessible using "Deny from all" or similar.
>
>   
>>> [2] Is there any web based tool which can show the error logs in real
>>> time ? any chance by awstats ?
>>>   
> I'm not aware of one off the top of my head, but if you have shell access, 
> this will do it:
>
> tail -f /path/to/error.log
>
>   

Jeremy thanks for your response.

Actually I am interested to break the error log too with vlogger. But it
seems there is no option to do that. Regarding error log contents, I do
have shell access, but it would be nice to provide a web interface so
that the developer can see the errors at least.

-- 

জয়দীপ বক্সী


-
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] How to collect host specif error log and how to see those from web interface ?

2010-02-07 Thread Jeremy R.
>> [1] how can I break the error log as per vhost ?
>> 
>> Is it something like
>> 
>> 
>> 
>> [...]
>> ErrorLog /srv/www/htdocs/myvhost_dir/error.log
>> LogLevel error
>> [...]
>> 
>> 

Yes, it's exactly that. Just use the ErrorLog directive within your vhost. 
(P.S. Putting your error log inside your DocumentRoot is probably not a good 
idea as you generally don't want that to be visible to the world. At the very 
least, configure it not to be accessible using "Deny from all" or similar.

>> 
>> [2] Is there any web based tool which can show the error logs in real
>> time ? any chance by awstats ?

I'm not aware of one off the top of my head, but if you have shell access, this 
will do it:

tail -f /path/to/error.log

-- 
Jeremy R.
Owner, NovaWave Solutions
http://www.novawave.net/


-
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] How to collect host specif error log and how to see those from web interface ?

2010-02-07 Thread J. Bakshi
Any clue please ?


On 02/04/2010 11:11 AM, J. Bakshi wrote:
> Dear list,
>
> I already have vlogger installed in my server which breaks the apache
> access log as per vhost and awstas is working well. Hope you all admit
> that the main requirement is obviously error log. vlogger does not break
> the error log as it does with access log. I have two specif questions here.
>
> [1] how can I break the error log as per vhost ?
>
> Is it something like
>
> 
>
> [...]
> ErrorLog /srv/www/htdocs/myvhost_dir/error.log
> LogLevel error
> [...]
>
> 
>
> [2] Is there any web based tool which can show the error logs in real
> time ? any chance by awstats ?
>
> Thanks
>   


-- 
জয়দীপ বক্সী


-
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] Re: Fwd: Cron /root/bin/bugcron.sh

2010-02-07 Thread William A. Rowe Jr.
On 2/7/2010 6:45 PM, Sander Temme wrote:
> 
> 
> Begin forwarded message:
> 
>> ASF Bugzilla is running its weekly stats at Sun Feb 7 23:08:02 UTC 2010
> <..>
>>   65 bugs for Apache httpd-1.3
> 
> Now that we have lowered the boom on 1.3, shall we close it out for new bugs? 
>  
> 
> Anyone have an opinion on the existing open bugs?  Uproot them or let them 
> wilt? 

IMHO - either reclass them as trunk, fixed, or WONTFIX if they are n/a to trunk.

It's low hanging fruit for anyone on the user list.  What would users@ folks 
thing
of becoming the assignee of this weekly bug list, to help out with that?



-
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] How to set up a reverse proxy for login.facebook.com

2010-02-07 Thread fulan Peng
On Sun, Feb 7, 2010 at 9:54 PM, Matus UHLAR - fantomas
 wrote:
> On 07.02.10 01:09, fulan Peng wrote:
>> I am trying to set up a reverse proxy for facebook by using Apache
>> mod_proxy and mod_proxy_html.
>
> reverse proxy for facebook? Are you running facebook servers so you can run
> reverse proxy for it?

I am not running facebook server. I just set up a reverse proxy server for it.

>
>> Before, it always complain missing a file called ua_callback.php
>> I wget it from http://m.facebook.com. It looks like a html file
>> instead of a php file.
>
> Of course, the PHP is (usually) parsed on server and (usually) generates
> different content than PHP.

I cannot not understand this. I have set up reverse proxy for many web
sites which have php files. The browser ask for the php file, the
proxy should ask for the  backend server. The proxy get the results
from the backend server then deliver the results to the browser. Now,
error message on the proxy says the proxy is missing a php file,
something is wrong.

[Sun Feb 07 08:36:58 2010] [error] [client {the browser}] File does
not exist: /usr/local/www/apache22/data/ajax, referer:
https://{myip}:8381/15/login.php?login_attempt=1

So I wget http://m.facebook.com/ua_callback.php, I got a
ua_callback.php file which is the results to run the ua_callback.php.

I made a directory, /usr/local/www/apache22/data/ajax and put the
so-called ua_callback.php file in it to trick the browser.

I won't work.

This is my current config with cookie path and domain rewritten.
Still, it won't work.

ProxyPass /13/ http://www.facebook.com/
ProxyPassReverse /13/ http://www.facebook.com/
ProxyPassReverseCookiePath  /  /13
ProxyPassReverseCookieDomain  www.facebook.com  

RequestHeader unset Accept-Encoding
ProxyHTMLURLMap http://www.facebook.com
https://${envirnvariableformyip}:8381/13   V
ProxyHTMLURLMap https://login.facebook.com
https://${envirnvariableformyip}:8381/15   V
ProxyHTMLURLMap / /13/

ProxyPass /15/ https://login.facebook.com/
ProxyPassReverse /15/ https://login.facebook.com/
ProxyPassReverseCookiePath  /  /15
ProxyPassReverseCookieDomain login.facebook.com  


>
>> Any body had experience to make a reverse proxy for facebook, please
>> give me a hint!
>
> What is the point for running special proxcy for facebook?

Reverse proxy for facebook can help those people behind a firewall to
access facebook. There are many reverse proxy already made for
facebook. I dont know how they are made.
facebook.com worth 5 billion dollars. If you can make a proxy for it,
sure it is useful.

>
>
> Matus  - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
> Warning: I wish NOT to receive e-mail advertising to this address.
> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
> Chernobyl was an Windows 95 beta test site.
>
> -
> 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: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

-
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] How to set up a reverse proxy for login.facebook.com

2010-02-07 Thread Matus UHLAR - fantomas
On 07.02.10 01:09, fulan Peng wrote:
> I am trying to set up a reverse proxy for facebook by using Apache
> mod_proxy and mod_proxy_html.

reverse proxy for facebook? Are you running facebook servers so you can run
reverse proxy for it?

> Before, it always complain missing a file called ua_callback.php
> I wget it from http://m.facebook.com. It looks like a html file
> instead of a php file.

Of course, the PHP is (usually) parsed on server and (usually) generates
different content than PHP.

> Any body had experience to make a reverse proxy for facebook, please
> give me a hint!

What is the point for running special proxcy for facebook?

-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Chernobyl was an Windows 95 beta test site.

-
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org