Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 4th, 2001, 03:08 PM
zog908 zog908 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: philadelphia, pa
Posts: 5 zog908 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to zog908 Send a message via AIM to zog908 Send a message via Yahoo to zog908
My server has been experiencing proglems due to too many CGI's running at the same time, I've often seen the load jump to well above 150, and I've had to hit the switch on the box a few times becuase I wasn't able to work in the shell to fix the problem. Does anyone know how I could set a maximum number of CGI's simultaneously executing, for the whole server? For each virtual host?

Also, I have been experiencing problems with some sites on my machine taking the server to it's maxclients limit, there are a few sites in particular, when this happens, everyone is locked out of the server until the traffic goes down, of course I could increase maxclients, but I was wondering if there is a way to set a maximum for each vhost, so if one site goes over it's limit, the others wont' be affected.

Any help is MUCH appreciated.

Marc

Reply With Quote
  #2  
Old March 4th, 2001, 03:58 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Start here -> http://httpd.apache.org/docs/mod/core.html#rlimitcpu and also check out RLimitMEM and RLimitNPROC. All of them can be configured globally or per vhost. You probably don't need to set RLimitNPROC, try to set rlimitcpu like so:

RLimitCPU 30 30 # 30 seconds

and rlimitmem:

RLimitMEM 10000000 10000000 # 10 mb

Reply With Quote
  #3  
Old March 4th, 2001, 05:31 PM
zog908 zog908 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: philadelphia, pa
Posts: 5 zog908 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to zog908 Send a message via AIM to zog908 Send a message via Yahoo to zog908
I have tried, and am using all three of those. From what I understand, these resource limitations you are speaking of refer to a single child process. Say i only wanted foo.com to only be aloud to run as many as 5 CGI scripts simultaneously, but from different children of course. The limit on the number of processes basically limits how many times a single CGI can fork. No matter how small I set these limits, if the site has enough traffic, and enough CGI's are spawned, it all adds up. When one of my customers CGI's got into an infinite loops and ran all during the night, I was able to fix that with the RLimitCPU, but now the site must be running close to 150 simultaneous CGI's, which is no better.

Also I am looking for something like the MaxClients directive, this directive limits the maximum number of simulataneous connections by limiting the number of httpd's spawned. This directive is not for vhosts, but for the whole server, it is very important to keep this limit for the whole server, but I want to also be able to make it per vhost, say for exampel I allow 100 simulataneous connections, and one of my sites are very big and are using 97 connections, and I have 30 other sites going, these other sites are not going to have service until the traffic on the bigger site slows down.

Maybe I am wrong on my analogy, but I have been working on this for weeks, and no luck!

Reply With Quote
  #4  
Old March 5th, 2001, 04:49 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> but I want to also be able to make it per vhost, say for exampel I allow 100 simulataneous connections

Maybe you should try mod_simultaneous: limits the number of simultaneous accesses to particular directories -> http://www.apacheweek.com/features/modulesoup

Note the particular dir, so you should be able to configure it per vhost.

In addition, maybe you should provide the following for me to take a look:
HostnameLookups xx
KeepAliveTimeout xx
StartServers xx
MinSpareServers xx
MaxSpareServers xx
MaxClients xx
MaxRequestsPerChild xx
RLimitCPU xx xx
RLimitMEM xx xx
and some hardware specification.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > setting apache resource limits


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway