Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    75
    Thanks
    1
    Thanked 12 Times in 12 Posts

    Reached MaxCients setting, but no traffic!

    I'm renting a somewhat powerful server with 12GB of RAM and twin xeon cpus running ubuntu 10.04 x64. I installed apache and mysql, I loaded the mod_rewrite module, and the site works fine!

    Until a couple of hours when the site becomes unresponsive. I'm still able to SSH into the server, I look at the error log and I see this:

    Code:
    server reached MaxClients setting, consider raising the MaxClients setting
    But apache serves maybe 10 visitors a day! The memory has barely been touched, as well as the cpu. I raised the maxclients setting to 800 where possible. Here are my current settings:
    Code:
    <IfModule mpm_prefork_module>
        ServerLimit         800
        StartServers          5
        MinSpareServers       5
        MaxSpareServers      20
        MaxClients          800
        MaxRequestsPerChild   0
    </IfModule>
    <IfModule mpm_worker_module>
        ServerLimit         800
        StartServers          2
        MaxClients          800
        MinSpareThreads      20
        MaxSpareThreads      75 
        ThreadsPerChild      20
        MaxRequestsPerChild   0
    </IfModule>
    <IfModule mpm_event_module>
        ServerLimit         800
        StartServers          2
        MaxClients          800
        MinSpareThreads      25
        MaxSpareThreads      75 
        ThreadLimit          64
        ThreadsPerChild      25
        MaxRequestsPerChild   0
    </IfModule>
    If I restart Apache, the site works for another couple hours until I get the same MaxClients error. Any help would be very much appreciated, I can't let this server suck up my money while being useless.

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Why did you set MaxRequestsPerChild to 0? If you do that the child process will never terminate. Which is probably how you are maxing out the number of connections.

    See: http://httpd.apache.org/docs/2.0/mod...questsperchild
    OracleGuy

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    75
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Quote Originally Posted by oracleguy View Post
    Why did you set MaxRequestsPerChild to 0? If you do that the child process will never terminate. Which is probably how you are maxing out the number of connections.

    See: http://httpd.apache.org/docs/2.0/mod...questsperchild
    I changed it to 900, and the same error occurred again.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •