You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Philip Mak <pm...@aaanime.net> on 2001/02/23 00:14:30 UTC

(apache question) Working around MaxClients?

Hello,

I have a high traffic website (looks like 200 GB output per month,
something around 100000-200000 hits per day) hosted on a commercial
service. The service does not limit my bandwidth usage, but they limit the
number of concurrent Apache process that I can have to 41. This causes the
server to delay accepting new connections during peak times.

My account is a "virtual server"; what this means is that I have access to
the Apache httpd.conf files and can restart the Apache daemon, but do not
have the priviledge to bind a program to port 80 (so I can't put thttpd on
port 80).

I was thinking of serving the HTML files from Apache and the JPG files
from thttpd (thttpd uses select() so it always only uses up one process,
no matter how many connections it's handling) on port 8080, but there's
one disadvantage: People who browse my site from behind certain firewalls
can only see port 80.

Does anyone know of a way to configure Apache so that it will pass port 80
traffic onto port 8080 somehow, without having access to modify the
binary? It would have to do this without needing to spawn a child for
every request though. Or is this impossible?

Thanks,

-Philip Mak (pmak@aaanime.net)

P.S. Is there a mailing list for general Apache questions somewhere? I
can't seem to find one.


RE: [OT] (apache question) Working around MaxClients?

Posted by Stathy Touloumis <st...@edventions.com>.
You could defined a different port in your <img> tags.  Then you can start
thttpd to bind to that port.  You shouldn't have a problem binding to ports
higher that 1024(?) I think.  Unless they have done something to prevent
this which is doubtful.

Example:
<img src="http://www.foo.com:6666/test/test.gif">

Unfortunately it could mean changing lots of code on your site.  Of course,
you could use something like Apache::filter to alter your image tags on the
way out.  I don't think this would be a difficult issue though.  The main
thing is if you can bind to ports over 1024.

> > I have a high traffic website (looks like 200 GB output per month,
> > something around 100000-200000 hits per day) hosted on a commercial
> > service. The service does not limit my bandwidth usage, but
> they limit the
> > number of concurrent Apache process that I can have to 41. This
> causes the
> > server to delay accepting new connections during peak times.
> > My account is a "virtual server"; what this means is that I
> have access to
> > the Apache httpd.conf files and can restart the Apache daemon,
> but do not
> > have the priviledge to bind a program to port 80 (so I can't
> put thttpd on
> > port 80).

Stathy Touloumis
Coder
if ( eval{ $you => require Perl } ) { $you = '?3r1 H@c|<3r' }

Edventions
8800 Bronx Ave
Skokie, IL 60077
www.edventions.com
stathy.touloumis@edventions.com


Re: [OT] (apache question) Working around MaxClients?

Posted by Perrin Harkins <pe...@primenet.com>.
> I have a high traffic website (looks like 200 GB output per month,
> something around 100000-200000 hits per day) hosted on a commercial
> service. The service does not limit my bandwidth usage, but they limit the
> number of concurrent Apache process that I can have to 41. This causes the
> server to delay accepting new connections during peak times.

That seems pretty arbitrary.  They use that instead of some kind of memory
or CPU cap?

> My account is a "virtual server"; what this means is that I have access to
> the Apache httpd.conf files and can restart the Apache daemon, but do not
> have the priviledge to bind a program to port 80 (so I can't put thttpd on
> port 80).

That rules out some obvious solutions like lingerd and squid (which I think
uses a select loop).  Sounds like they've made it so there's nothing you can
do except try to server your content faster.  You could look at
Apache::Compress.

- Perrin


Re: [OT] RE: (apache question) Working around MaxClients?

Posted by Philip Mak <pm...@aaanime.net>.
# Doesn't work. Children still get tied up serving requests.
#ProxyPass / http://www.animewallpapers.com:8080/
#ProxyPassReverse / http://www.animewallpapers.com:8080/

That doesn't get me around the limit of 41 Apache processes...

-Philip Mak (pmak@aaanime.net)

On Thu, 22 Feb 2001, Stathy Touloumis wrote:

> Why don't you setup apache to do proxying?
> 
> > I have a high traffic website (looks like 200 GB output per month,
> > something around 100000-200000 hits per day) hosted on a commercial
> > service. The service does not limit my bandwidth usage, but they limit the
> > number of concurrent Apache process that I can have to 41. This causes the
> > server to delay accepting new connections during peak times.
> >
> > My account is a "virtual server"; what this means is that I have access to
> > the Apache httpd.conf files and can restart the Apache daemon, but do not
> > have the priviledge to bind a program to port 80 (so I can't put thttpd on
> > port 80).
> >
> > I was thinking of serving the HTML files from Apache and the JPG files
> > from thttpd (thttpd uses select() so it always only uses up one process,
> > no matter how many connections it's handling) on port 8080, but there's
> > one disadvantage: People who browse my site from behind certain firewalls
> > can only see port 80.
> >
> > Does anyone know of a way to configure Apache so that it will pass port 80
> > traffic onto port 8080 somehow, without having access to modify the
> > binary? It would have to do this without needing to spawn a child for
> > every request though. Or is this impossible?


[OT] RE: (apache question) Working around MaxClients?

Posted by Stathy Touloumis <st...@edventions.com>.
Why don't you setup apache to do proxying?

> I have a high traffic website (looks like 200 GB output per month,
> something around 100000-200000 hits per day) hosted on a commercial
> service. The service does not limit my bandwidth usage, but they limit the
> number of concurrent Apache process that I can have to 41. This causes the
> server to delay accepting new connections during peak times.
>
> My account is a "virtual server"; what this means is that I have access to
> the Apache httpd.conf files and can restart the Apache daemon, but do not
> have the priviledge to bind a program to port 80 (so I can't put thttpd on
> port 80).
>
> I was thinking of serving the HTML files from Apache and the JPG files
> from thttpd (thttpd uses select() so it always only uses up one process,
> no matter how many connections it's handling) on port 8080, but there's
> one disadvantage: People who browse my site from behind certain firewalls
> can only see port 80.
>
> Does anyone know of a way to configure Apache so that it will pass port 80
> traffic onto port 8080 somehow, without having access to modify the
> binary? It would have to do this without needing to spawn a child for
> every request though. Or is this impossible?