The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Is there a way to limit a site's simultaneous access?

Discussion in 'General Discussion' started by carock, Dec 4, 2006.

  1. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    I have a site that uses up all my apache slots occasionally. This leaves all the other sites on that server unable to access.

    Does anyone know if there's a way in cPAne;/WHM or in the Apache config file to limit a site to say 100 simultaneous connections and that way leaves the rest available for the other sites?

    Thanks,
    Chuck
     
  2. hgrfoshee

    hgrfoshee Member
    PartnerNOC

    Joined:
    Aug 22, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    This is possible with adding "MaxClients NN" to your .htaccess where NN is a positive number.
     
  3. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    That doesn't appear to work. I get Internal Server Error.

    According to another thread I found searching Yahoo, that config option can only be in the httpd.conf file, and only once globally, not in the Virtual host configuration.

    Thanks for the idea though.

    Chuck
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Not sure you can on a "per site" basis. But one should ask, can the apache server itself be tuned better to accomodate or has the site out grown this server. It is a shame to penalize a site for being popular and the client may not find you too popular if you start limiting how many people can hit their site at one time. Just my opinion. ;)
     
  5. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    I agree, shared hosting has it's drawbacks that most customers don't realize. This is a big one for some people in that a site can be temporarily popular and not leave any room for the rest of the customers.

    Moving other customers from one server to another is usually not acceptable, and unless it's dedicated hosting, they are still prone to the same problem.

    I have a Brazil web site hosted on a busy server with 100+ customers. The Brazil site is pretty popular too, but normal monthly bandwidth is only around 16 Gig.

    The plane crash in Brazil last month or so ago shot his web hits up and maxed out the simulataneous users limit on the server for over 4 days.

    The other day, I saw the same sit explode again, and did some searching. Yahoo.com home page had a story about a 27 story Chrsitmas tree in Rio De Janero. Bam, that server overload fortunately only lasted about 6 hours. The following day also had another residual for a few hours again, but not half as bad as the original.

    The bottom line is, it's shared hosting, and if your site wants the whole box, as a service provider, I need to be able to limit it so I can sell it. Otherwise, there's only one solution and thats to shut the site down until the draw goes away. Unfortunately, the customer probably goes with it.

    I was hoping cPanel's custom bandwidth mod for Apache had some kind of control in it that allowed for this type of per site limit for available apache server slots. I dont' even know if it's possible. I believe at some time Apache did have this control because I did find a lot of sites explaining how you could put MaxClients directive in the .htacces files. Apache's documentation no longer reflects that, and I also tried it and it didn't work.

    That type of control would be awesome, and I believe every single cPanel customer would use it.

    Chuck
     
  6. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    How about this idea ??
    Install another version of Apache listening on another port ( so they don't conflict ) and put your busy site on a seperate IP in the second apache. I never tried it, but in theory it should work.
     
  7. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    That would take it out of cPanel's management capabilities though wouldn't it?

    The customer would still need to use the cPanel tools, web logs, etc. I would still need ot be able to rebuild Apache with WHM and so on.

    Chuck
     
  8. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Only problem i can see is that the bandwidth on Apache (2) would not be included, but all other cpanel services should be available.
     
  9. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page