RE: module crashing after upgrade to 2.6 kernel and glibc 2.3.4

2007-02-27 Thread SSingh
here is backtrace:
(gdb) bt
#0  0xe410 in __kernel_vsyscall ()
#1  0xb7d43bbb in pthread_setspecific () from /lib/libpthread.so.0
#2  0x080c92de in ap_graceful_stop_signalled ()
#3  0x080c9434 in ap_graceful_stop_signalled ()
#4  0x080c9cbc in ap_mpm_run ()
#5  0x080686b8 in main ()

-Original Message-
From: William A. Rowe, Jr. [mailto:[EMAIL PROTECTED]
Sent: Friday, February 23, 2007 10:50 PM
To: dev@httpd.apache.org
Subject: Re: module crashing after upgrade to 2.6 kernel and glibc 2.3.4


[EMAIL PROTECTED] wrote:
 Hi,
 I hv recently upgraded kernel of my box to linux 2.6 and also
 glibc to 2.3.4. One of my custom apache 2.2 modules which was working
 earlier fine is crashing now.
 
 Anybody faced similar problem?

Present a backtrace?  Try turning EnableMMAP/EnableSendfile off?  Also
perhaps something with the acceptfilter, try AcceptFilter (proto) off,
e.g. AcceptFilter http none?


The information contained in this electronic mail transmission may be 
privileged and confidential, and therefore, protected from disclosure. If you 
have received this communication in error, please notify us immediately by 
replying to this message and deleting it from your computer without copying or 
disclosing it.

RE: module crashing after upgrade to 2.6 kernel and glibc 2.3.4

2007-02-27 Thread SSingh
one more trace:
(gdb) bt
#0  0xe410 in __kernel_vsyscall ()
#1  0xb7d43bbb in pthread_setspecific () from /lib/libpthread.so.0
#2  0x080c92de in child_main (child_num_arg=0) at worker.c:1258
#3  0x080c9434 in make_child (s=0x8109270, slot=0) at worker.c:1341
#4  0x080c9cbc in ap_mpm_run (_pconf=0x81020a8, plog=0x814c1d0, s=0x8109270)
at worker.c:1543
#5  0x080686b8 in main (argc=6, argv=0xbfafb7d4) at main.c:717


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 27, 2007 3:36 PM
To: dev@httpd.apache.org
Subject: RE: module crashing after upgrade to 2.6 kernel and glibc 2.3.4



here is backtrace: 
(gdb) bt 
#0  0xe410 in __kernel_vsyscall () 
#1  0xb7d43bbb in pthread_setspecific () from /lib/libpthread.so.0 
#2  0x080c92de in ap_graceful_stop_signalled () 
#3  0x080c9434 in ap_graceful_stop_signalled () 
#4  0x080c9cbc in ap_mpm_run () 
#5  0x080686b8 in main () 

-Original Message- 
From: William A. Rowe, Jr. [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ] 
Sent: Friday, February 23, 2007 10:50 PM 
To: dev@httpd.apache.org 
Subject: Re: module crashing after upgrade to 2.6 kernel and glibc 2.3.4 


[EMAIL PROTECTED] wrote: 
 Hi, 
 I hv recently upgraded kernel of my box to linux 2.6 and also 
 glibc to 2.3.4. One of my custom apache 2.2 modules which was working 
 earlier fine is crashing now. 
 
 Anybody faced similar problem? 

Present a backtrace?  Try turning EnableMMAP/EnableSendfile off?  Also 
perhaps something with the acceptfilter, try AcceptFilter (proto) off, 
e.g. AcceptFilter http none? 


The information contained in this electronic mail transmission may be
privileged and confidential, and therefore, protected from disclosure. If
you have received this communication in error, please notify us immediately
by replying to this message and deleting it from your computer without
copying or disclosing it.




The information contained in this electronic mail transmission may be 
privileged and confidential, and therefore, protected from disclosure. If you 
have received this communication in error, please notify us immediately by 
replying to this message and deleting it from your computer without copying or 
disclosing it.

Re: What do you think about Lighttpd?

2007-02-27 Thread Arnold Daniels

Hi,

1. Apache 2.2 can be used event based request handling, though is is 
still under development. http://httpd.apache.org/docs/2.2/mod/event.html

2. Apache supports fast cgi

Best regards,
Arnold

howard chen wrote:

Can anyone give some comments abt in their implementations which are
difference from Httpd on the following area:

1. single-threaded, event-based, (powered by epoll)
2. fast cgi support


seems that these two points are quite attractive to use, why seldom
heard abt them in Httpd world?

:)

Thanks for any comments.


Re: What do you think about Lighttpd?

2007-02-27 Thread howard chen

Hello,

Thanks for your reply first.

I understand Apache already support fastcgi, however, phper most
likely will prefer mod_php, so fastcgi in Apache is not as popular as
in other http servers.

Similarly, later Apache 2.x might officially support event based model
rather than multi-process one.

We know that fastcgi  event based model have some very attractive
reasons, such as better usage of cpu time, more robust even under high
loading.

I am not asking whether/when Apache support these functions, I want to
learn more abt from the Apache httpd developers, their way of thinking
behind these approaches..why they are not good or not suitable in
Apache, why?

I belive there must be some reasons behind. :)


Thanks.

howa


On 2/27/07, Arnold Daniels [EMAIL PROTECTED] wrote:

Hi,

1. Apache 2.2 can be used event based request handling, though is is
still under development. http://httpd.apache.org/docs/2.2/mod/event.html
2. Apache supports fast cgi


Re: What do you think about Lighttpd?

2007-02-27 Thread Nick Kew
On Tue, 27 Feb 2007 21:37:29 +0800
howard chen [EMAIL PROTECTED] wrote:

 Hello,
 
 Thanks for your reply first.
 
 I understand Apache already support fastcgi, however, phper most
 likely will prefer mod_php, so fastcgi in Apache is not as popular as
 in other http servers.

You have the choice.  If more people use mod_php than fastcgi,
that's because they're choosing it.

 Similarly, later Apache 2.x might officially support event based model
 rather than multi-process one.

Apache 2.2 does, if you want it to.

Since Apache 2.0, we've had the MPM architecture, which means you can
plug in your choice of processing model.  That's also how Apache 2
works cross-platform, rather than being (like Apache 1) a Unix server
ported with lots of compromises in performance/etc to other platforms.

 We know that fastcgi  event based model have some very attractive
 reasons, such as better usage of cpu time, more robust even under high
 loading.

Do we?  Of course you can set up test cases where that applies.
Or the opposite.

 I am not asking whether/when Apache support these functions, I want to
 learn more abt from the Apache httpd developers, their way of thinking
 behind these approaches..why they are not good or not suitable in
 Apache, why?

Apache gives you the choice.  Write a new MPM to drive it as you want.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/


Re: What do you think about Lighttpd?

2007-02-27 Thread howard chen

On 2/27/07, Nick Kew [EMAIL PROTECTED] wrote:

You have the choice.  If more people use mod_php than fastcgi,
that's because they're choosing it.


yes, this is really interesting. sometimes i really don't understand them...
especially php does not recommended threaded MPM in apache2...so
continue to use apache 1.x ?

:)


Since Apache 2.0, we've had the MPM architecture, which means you can
plug in your choice of processing model.  That's also how Apache 2
works cross-platform, rather than being (like Apache 1) a Unix server
ported with lots of compromises in performance/etc to other platforms.



i was surprised that event based MPM did not catch too much attention
of Apache developers? maybe i am wrong? :)


howa


Re: Questions on configuring Apache Server

2007-02-27 Thread Erica Zhang

Hi,
Thanks.

Well, my idea is want to analyze all requests from client before they 
arrives to the user applications and also analyze all responsed html 
after they are created by server applications and before they are 
arrived at client.


To solve this problem, originally, I want to set up two ports. One port 
for the user applications and the other is for my tool. My tool will 
communicate with the user applications through Apache HTTP Server. 
However, now, I do not think it is a good idea.


Now I am considering to develop a simple tool to solve this problem like 
Apache HTTP Server to catch the request and response. But I am not still 
sure about if this is a good idea, because I am not familiar with web 
application development .


What is your idea ?

Thanks,

Erica

Joshua Slive wrote:


On 2/26/07, Erica Zhang [EMAIL PROTECTED] wrote:


Hi,

I am developing some component, which need Apache to be able to listen
to two ports, instead of only one default port. I do not know if there
is some way to configure Apache http server to work in this way. I do
not want to configure it to be virtual host.



Listen 80
Listen 81
in httpd.conf should do the trick.

Or if not, you need to better specify what you are trying to do.

Joshua.





Re: Questions on configuring Apache Server

2007-02-27 Thread Issac Goldstand
It sounds like you want to write a pair of filters.  There are several
examples of writing them in C, and a more detailed tutorial with
background at the mod_perl website
http://perl.apache.org/docs/2.0/user/handlers/filters.html

 Issac

Erica Zhang wrote:
 Hi,
 Thanks.
 
 Well, my idea is want to analyze all requests from client before they
 arrives to the user applications and also analyze all responsed html
 after they are created by server applications and before they are
 arrived at client.
 
 To solve this problem, originally, I want to set up two ports. One port
 for the user applications and the other is for my tool. My tool will
 communicate with the user applications through Apache HTTP Server.
 However, now, I do not think it is a good idea.
 
 Now I am considering to develop a simple tool to solve this problem like
 Apache HTTP Server to catch the request and response. But I am not still
 sure about if this is a good idea, because I am not familiar with web
 application development .
 
 What is your idea ?
 
 Thanks,
 
 Erica
 
 Joshua Slive wrote:
 
 On 2/26/07, Erica Zhang [EMAIL PROTECTED] wrote:

 Hi,

 I am developing some component, which need Apache to be able to listen
 to two ports, instead of only one default port. I do not know if there
 is some way to configure Apache http server to work in this way. I do
 not want to configure it to be virtual host.


 Listen 80
 Listen 81
 in httpd.conf should do the trick.

 Or if not, you need to better specify what you are trying to do.

 Joshua.
 


Re: Questions on configuring Apache Server

2007-02-27 Thread Issac Goldstand
It sounds like you want to write a pair of filters.  There are several
examples of writing them in C, and a more detailed tutorial with
background at the mod_perl website
http://perl.apache.org/docs/2.0/user/handlers/filters.html


Erica Zhang wrote:
 Hi,
 Thanks.
 
 Well, my idea is want to analyze all requests from client before they
 arrives to the user applications and also analyze all responsed html
 after they are created by server applications and before they are
 arrived at client.
 
 To solve this problem, originally, I want to set up two ports. One port
 for the user applications and the other is for my tool. My tool will
 communicate with the user applications through Apache HTTP Server.
 However, now, I do not think it is a good idea.
 
 Now I am considering to develop a simple tool to solve this problem like
 Apache HTTP Server to catch the request and response. But I am not still
 sure about if this is a good idea, because I am not familiar with web
 application development .
 
 What is your idea ?
 
 Thanks,
 
 Erica
 
 Joshua Slive wrote:
 
 On 2/26/07, Erica Zhang [EMAIL PROTECTED] wrote:

 Hi,

 I am developing some component, which need Apache to be able to listen
 to two ports, instead of only one default port. I do not know if there
 is some way to configure Apache http server to work in this way. I do
 not want to configure it to be virtual host.


 Listen 80
 Listen 81
 in httpd.conf should do the trick.

 Or if not, you need to better specify what you are trying to do.

 Joshua.
 


Re: What do you think about Lighttpd?

2007-02-27 Thread Arnold Daniels

Howerd,

PHP does not recommend running php as a module in a threaded 
environment, because a number of PHP extensions are not thread-safe. 
Apache2 MPM-prefork will run just fine with php as module.


Nick already told you, that Apache allows you to choose. So simply use 
the fast-cgi/mpm-event combo, if you like that best. And if you want to 
evangelize the combo, nobody is stopping you.


There not much more to say about this topic, so please consider it closed.

Best regards,
Arnold


howard chen wrote:

On 2/27/07, Nick Kew [EMAIL PROTECTED] wrote:

You have the choice.  If more people use mod_php than fastcgi,
that's because they're choosing it.


yes, this is really interesting. sometimes i really don't understand 
them...

especially php does not recommended threaded MPM in apache2...so
continue to use apache 1.x ?

:)


Since Apache 2.0, we've had the MPM architecture, which means you can
plug in your choice of processing model.  That's also how Apache 2
works cross-platform, rather than being (like Apache 1) a Unix server
ported with lots of compromises in performance/etc to other platforms.



i was surprised that event based MPM did not catch too much attention
of Apache developers? maybe i am wrong? :)


howa


Re: Questions on configuring Apache Server

2007-02-27 Thread Plüm , Rüdiger , VF EITO
Maybe modsecurity (http://www.modsecurity.org/) already does what you need.
Otherwise it gives you an impression how to write an appropriate module to do 
so.
Looking at http://apache.webthing.com/ for mod_accessibility and for 
mod_proxy_html
also seems to be good idea to either find out that what you need is already 
there
or to get an idea how to do it yourself.

Regards

Rüdiger

 -Ursprüngliche Nachricht-
 Von: Erica Zhang [mailto:[EMAIL PROTECTED] 
 Gesendet: Dienstag, 27. Februar 2007 17:50
 An: dev@httpd.apache.org
 Betreff: Re: Questions on configuring Apache Server
 
 
 Hi,
 Thanks.
 
 Well, my idea is want to analyze all requests from client before they 
 arrives to the user applications and also analyze all responsed html 
 after they are created by server applications and before they are 
 arrived at client.
 
 To solve this problem, originally, I want to set up two 
 ports. One port 
 for the user applications and the other is for my tool. My tool will 
 communicate with the user applications through Apache HTTP Server. 
 However, now, I do not think it is a good idea.
 
 Now I am considering to develop a simple tool to solve this 
 problem like 
 Apache HTTP Server to catch the request and response. But I 
 am not still 
 sure about if this is a good idea, because I am not familiar with web 
 application development .
 
 What is your idea ?
 
 Thanks,
 
 Erica
 
 Joshua Slive wrote:
 
  On 2/26/07, Erica Zhang [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I am developing some component, which need Apache to be 
 able to listen
  to two ports, instead of only one default port. I do not 
 know if there
  is some way to configure Apache http server to work in 
 this way. I do
  not want to configure it to be virtual host.
 
 
  Listen 80
  Listen 81
  in httpd.conf should do the trick.
 
  Or if not, you need to better specify what you are trying to do.
 
  Joshua.
 
 
 


RE: hi

2007-02-27 Thread meenakshi.sundaram


Hi,
Will this patch be incorporated into apache?
http://mail-archives.apache.org/mod_mbox/httpd-dev/200603.mbox/20060321
[EMAIL PROTECTED]

(patch provides balancer support to ProxyRemote directive).

Thanks,
MMS.


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com


Re: Small patch to ab apr_socket_recv error handling

2007-02-27 Thread Aaron Bannert
Apache shouldn't be prematurely disconnecting sockets in the middle
of a response unless there is a serious problem (Eg. the Apache
child process is crashing). Could you describe how to reproduce this?

As for the patch, could you make this configurable with a command-line
option? That way the current functionality can stay default (meaning,
all recv() errors are fatal) and for those circumstances where the
user knows that there is some network-level or Apache-level problem
causing intermittent recv() errors, they can still get performance
results out of AB.

-aaron


On Mon, Feb 26, 2007 at 01:06:14PM -0700, Filip Hanik - Dev Lists wrote:
 I've created a small patch that lets ab continue even if it encounters 
 an error on apr_socket_recv
 
 quite commonly, when servers are overloaded they disconnect the socket, 
 ab receives a 104 (connection reset by peer) and the ab test exits.
 
 This patch logs the error, both counters correctly, cleans up the 
 connection and continues.
 
 thoughts?
 
 Filip

 Index: ab.c
 ===
 --- ab.c  (revision 511976)
 +++ ab.c  (working copy)
 @@ -1332,7 +1332,10 @@
  err_except++; /* XXX: is this the right error counter? */
  /* XXX: Should errors here be fatal, or should we allow a
   * certain number of them before completely failing? -aaron */
 -apr_err(apr_socket_recv, status);
 +//apr_err(apr_socket_recv, status);
 +bad++;
 +close_connection(c);
 +return;
  }
  }
  



Re: 3.0 - Proposed Goals

2007-02-27 Thread Jim Jagielski
Sander Temme wrote:
 
 How many Apache 'D' versions do we want to maintain?  Popularity of  
 1.3 is still too high for us to completely ignore, and there is much  
 2.0 still out there.
 

Any many people taking up 2.2...

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
If you can dodge a wrench, you can dodge a ball.


Fwd: [General Wiki] Trivial Update of htaccess by JohnCrown

2007-02-27 Thread Leo Simons

FYI. Removing is possible by visiting

  http://wiki.apache.org/general/htaccess

selecting Login on the top right, logging in (or creating an  
account), and then deleting the page using the more actions drop down.


cheers,

- Leo

Begin forwarded message:


From: Apache Wiki [EMAIL PROTECTED]
Date: January 3, 2007 2:26:49 PM GMT+01:00
To: [EMAIL PROTECTED]
Subject: [General Wiki] Trivial Update of htaccess by JohnCrown

Dear Wiki user,

You have subscribed to a wiki page or wiki category on General  
Wiki for change notification.


The following page has been changed by JohnCrown:
http://wiki.apache.org/general/htaccess

New page:
= How do I use .htaccess files? =

Implementation of .htaccess files is universal across the Internet.  
Many manuals are available online. You can visit your favorite  
search engine and search for 'htaccess', and you'll probably find a  
nice tutorial just like [http://httpd.apache.org/docs/2.0/howto/ 
htaccess.html this one]!  Once you have grasped the basic concepts,  
it would definately help you to refer to the many examples  
available here on the wiki, there is also a great [http:// 
www.askapache.com/2006/htaccess/htaccesselite-ultimate-htaccess- 
article.html htaccess Code Snippet Article] full of the most  
commonly requested htaccess code examples.




== How can I create a plain text file for .htaccess? ==

You can do it by sshing in to yourdomain.com and using pico, a user- 
friendly text editor. All the commands for its use appear at the  
bottom of the page (^ means ''press the Control key.'') Just change  
to the directory in which you want to use .htaccess, and type  
pico .htaccess to get started with a blank .htaccess file.


== How do I block certain IPs from accessing my site or directory? ==
It's pretty easy!  All you have to do is file in the directory  
you'd like to restrict (your main directory to restrict the entire  
site) and then put the following in it:


{{{
 Limit GET
 order allow,deny
 allow from all
 deny from 123.142.124.152
 deny from 124.24.
 /LIMIT
}}}


You can put whole ips or just the beginning part you'd like to  
match, and you can add more and more ips, each with its own line!
When somebody's ip is banned, they will get a 403 error (access  
forbidden) when trying to visit your site.



== How do I block people coming from a certain website or URL from  
visiting my site or directory? ==


It's actually very similar to [[KB / Unix / .htaccess files|  
blocking people by IP]]! Again, you need to add some lines to  
an .htaccess text file that you create in the home directory of  
your web site.


Here is some example code for giving everybody who comes to you  
from www.yahoo.com or www.google.com an (access denied):


{{{
 SetEnvIfNoCase Referer ^http://www.google.com/; BadReferrer
 SetEnvIfNoCase Referer ^http://www.yahoo.com/; BadReferrer
 order deny,allow
 deny from env=BadReferrer
}}}

Another way to block people where you end up just redirecting them  
to a different url involves using the [http://httpd.apache.org/ 
docs/mod/mod_rewrite.html mod_rewrite] functionality of our web  
server. Here's how to block everybody from www.yahoo.com and  
www.google.com again (put this in your .htaccess file):


{{{
 RewriteEngine On
 RewriteCond %{HTTP_REFERER} ^http://www.yahoo.com/
 RewriteRule /* http://www.yoursite.com/restricted_url.html [R,L]
 RewriteCond %{HTTP_REFERER} ^http://www.google.com/
 RewriteRule /* http://www.yoursite.com/restricted_url.html [R,L]
}}}


== Force a server to only use SSL and fix double logins ==
If you really want to be sure that your server is only serving  
documents over an encrypted SSL channel ''(you wouldn't want  
visitors to submit a htaccess password prompt on an unencrypted  
connection)'' then you need to use the '''SSLRequireSSL'''  
directive with the +StrictRequire Option turned on.


{{{
 SSLOptions +StrictRequire
 SSLRequireSSL
 SSLRequire %{HTTP_HOST} eq site.com #or www.site.com
 ErrorDocument 403 https://site.com
}}}

The cool thing about using mod_ssl instead of mod_rewrite to force  
SSL is that apache gives mod_ssl priority ABOVE mod_rewrite so it  
will always require SSL.  ''(may be able to get around first method  
using http://site.com:443 or https://site.com:80)''
* An in-depth article about what this is doing can be found in the  
[http://www.htaccesselite.com/htaccess/redirecting-all-or-part-of-a- 
server-to-ssl-vt61.html SSL Forum]




== How do I stop others from hotlinking my files? ==
Hotlinking is when somebody displays an image (or any type of  
file actually) on somebody else's web site directly inline on their  
site!  There's nothing particularly '''wrong''' with that, it's a  
big part of how the WWW was designed to work. However, it does  
steal the bandwidth of the original site, and could possibly  
infringe on a copyright.


 Blocking specific domains 
The following code will return a '''403 Forbidden''' error instead  
of the requested image, but 

Re: Board Report is due on Monday....

2007-02-27 Thread Jim Jagielski
Paul Querna wrote:
 
 Events since November:
 - mod_ftp graduates from incubator httpd tlp
 - next generation aka 'amsterdamn' discussions started

with sandbox creation.

 - TSU encryption notifications sent for httpd and flood.
 - httpd 2.2.4 released
 - no pmc changes or committer changes
 - mod_wombat IP clearance done. (import happening RSN)
 
 Anything else anyone can come up with?
 

Not really.


-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
If you can dodge a wrench, you can dodge a ball.


how to say to apache, to not send headers

2007-02-27 Thread bronto

Hi there experts,

I have a module written by me, which (less or more) serves content. 
Everything went well until we ran some JMeter tests, which has 
discovered that keep-alive requests, to our module, are returning 
zero-sized OK pages (I mean code 200, with content-length:0). Ethereal 
discovered that it actually served the content, _but_ after that apache 
sends out another headers. Which is certainly ok, because it thinks that 
there was no content sent.


What I need, is a way how can I tell apache, to stop processing the 
particular request.
But my guess is, that it actually sends headers right after it knows the 
length of content and stuff.


some points:
  - I can create headers (they are pretty static, except the 
content-length) (actually, as you could figure out, I *am* creating 
headers through the process of serving the content)

  - I know the length of content prior to sending it to the socket
  - I can't use buckets, brigades or any kind of buffers. The reason 
is, that the content is being sent directly to socket by an external 
library linked with my module.


Are you aware of any process how this could be done ?

I still could close the socket, which I am writing to...but this is 
awkward one, don't you think ? And it's not a solution, since we are 
trying to keep the connection up to serve multiple requests :)



Thanks a lot, I'm looking forward to your suggestions/questions


Re: Small patch to ab apr_socket_recv error handling

2007-02-27 Thread Filip Hanik - Dev Lists

hi Aaron,
I added in the -r command line options, to not exit out on 
apr_socket_recv errors.

Patch attached

Filip

Aaron Bannert wrote:

Apache shouldn't be prematurely disconnecting sockets in the middle
of a response unless there is a serious problem (Eg. the Apache
child process is crashing). Could you describe how to reproduce this?

As for the patch, could you make this configurable with a command-line
option? That way the current functionality can stay default (meaning,
all recv() errors are fatal) and for those circumstances where the
user knows that there is some network-level or Apache-level problem
causing intermittent recv() errors, they can still get performance
results out of AB.

-aaron
  


Index: ab.c
===
--- ab.c(revision 511976)
+++ ab.c(working copy)
@@ -258,6 +258,7 @@
 /* - GLOBALS  */
 
 int verbosity = 0;  /* no verbosity by default */
+int recverrok = 0;
 int posting = 0;/* GET by default */
 int requests = 1;   /* Number of requests to make */
 int heartbeatres = 100; /* How often do we say we're alive */
@@ -1330,9 +1331,19 @@
 /* catch legitimate fatal apr_socket_recv errors */
 else if (status != APR_SUCCESS) {
 err_except++; /* XXX: is this the right error counter? */
-/* XXX: Should errors here be fatal, or should we allow a
- * certain number of them before completely failing? -aaron */
-apr_err(apr_socket_recv, status);
+if ( recverrok ) {
+bad++;
+close_connection(c);
+if ( verbosity = 1 ) {
+char buf[120];
+fprintf(stderr,%s: %s (%d)\n,apr_socket_recv, 
apr_strerror(status, buf, sizeof buf), status);
+}
+return;
+} else {
+/* XXX: Should errors here be fatal, or should we allow a
+ * certain number of them before completely failing? -aaron */
+apr_err(apr_socket_recv, status);
+}
 }
 }
 
@@ -1819,6 +1830,7 @@
 fprintf(stderr, -S  Do not show confidence estimators and 
warnings.\n);
 fprintf(stderr, -g filename Output collected data to gnuplot 
format file.\n);
 fprintf(stderr, -e filename Output CSV file with percentages 
served\n);
+fprintf(stderr, -r  Don't exit on apr_socket_recv 
errors.\n);
 fprintf(stderr, -h  Display usage information (this 
message)\n);
 #ifdef USE_SSL
 fprintf(stderr, -Z ciphersuite  Specify SSL/TLS cipher suite (See 
openssl ciphers)\n);
@@ -1981,7 +1993,7 @@
 #endif
 
 apr_getopt_init(opt, cntxt, argc, argv);
-while ((status = apr_getopt(opt, 
n:c:t:b:T:p:v:kVhwix:y:z:C:H:P:A:g:X:de:Sq
+while ((status = apr_getopt(opt, 
n:c:t:b:T:p:v:rkVhwix:y:z:C:H:P:A:g:X:de:Sq
 #ifdef USE_SSL
 Z:f:
 #endif
@@ -2032,6 +2044,9 @@
 exit(r);
 }
 break;
+case 'r':
+recverrok = 1;
+break;
 case 'v':
 verbosity = atoi(optarg);
 break;


Re: What do you think about Lighttpd?

2007-02-27 Thread Bill Stoddard



Since Apache 2.0, we've had the MPM architecture, which means you can
plug in your choice of processing model.  That's also how Apache 2
works cross-platform, rather than being (like Apache 1) a Unix server
ported with lots of compromises in performance/etc to other platforms.



i was surprised that event based MPM did not catch too much attention
of Apache developers? maybe i am wrong? :)

Howard,
Well, your both right and wrong :-)  The event driven network i/o model 
is really powerful and as you say, it can be much more robust as 
compared to a threaded process model, and it's also very scalable (think 
large number of concurrent clients). Here are what I see as the two 
basic problems:


1. Apache httpd runs everywhere or nearly so. Most platforms have their 
own event driven network i/o APIs (epoll, KQueue, aio, and so forth). 
Some platforms (notably Windows) have async network i/o APIs which means 
you also have to allocate and manage i/o buffers across your network i/o 
calls.  We've never quite settled on the right abstraction layer that is 
both portable, performs well and accommodates platforms that have more 
traditional network i/o models.


2. The core Apache httpd architecture is not really suited for use with 
an event driven/async network i/o API.  Yes we made the event MPM work , 
but it feels kinda hackish to me (and I helped do the work so I gotta 
right to criticize :-).  Someone recently suggested making the core 
httpd engine a state server; i really like that idea and maybe it will 
be a feature of 'amsterdam'. We'll see.


Bill




Re: What do you think about Lighttpd?

2007-02-27 Thread Colm MacCarthaigh
On Tue, Feb 27, 2007 at 12:05:08AM +0800, howard chen wrote:
 1. single-threaded, event-based, (powered by epoll)

httpd supports epoll() and event-based polling to the extent that the
system-call chains for handling a request by Apache httpd and lighttpd
are near-identical, it's hard to tell them apart using strace. The time
it takes the system calls to return completely dwarfs the CPU time spent
in actual code in my experience.  

Even with the worker MPM. using epoll gets Apache httpd and lighttpd
similar enough to the point that any difference is statistical noise -
though lighttpd is nearly always better for memory consumption.

That said, httpd ships with poor configuration defaults for achieving
this kind of performance (though are good reasons why those defaults are
suitable generally) compared to lighttpd (which does it practically out
of the box).

In general, the extent of any performance difference is pretty hard to
substantiate (and I've tried, though a systematic bias is that I'm
vastly more familiar with httpd code and know how to tune it better!)
and definitely over-stated. 

Either way, both servers are performant on regular hardware to an extent
that they will never prove to be the problem in any scalability
scenario. Each is capable of 100k and more concurrent requests and tens
of thousands of requests per second, if really really pushed. Other
kinds of limits will kick in *long* before the code in either httpd or
lighttpd is a problem, at the end of the way a webserver just boils down
to a handful of system calls. 

In the context of web-servers, performance comparisons are basically
bar-chart pornography, and of little real-world utility. Hell, even IIS
is usable these days. Better to concentrate on the feature-set and how
each server helps you do whatever it is you want better.

 2. fast cgi support

lighttpd's is better. httpd's is improving all the time though.

-- 
Colm MacCárthaighPublic Key: [EMAIL PROTECTED]


[PATCH 38014] - Patch review request

2007-02-27 Thread Basant Kukreja
Hi,
I work in the web tier group of Sun Microsystems Inc. 

I have submitted the patch for bug 38014
(The status '100 Continue' will be sent after the final status code)
http://issues.apache.org/bugzilla/show_bug.cgi?id=38014 

Can some of the committer kindly review my patch please to see if it is
acceptable or not?
Patch is against 2.2.x branch.

Regards,
Basant.