1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Increasing Server Limits

Discussion in 'Plesk for Linux - 8.x and Older' started by Hank, May 17, 2005.

  1. Hank

    Hank Guest

    0
     
    Hey guys, I've had my server for a few months now and everything had been running relatively without a hitch. Finally, after a while I have started to put domains and live sites onto this server. And now for the past three weekends in a row my apache will crash and give the error:

    Code:
    [Sun May 01 04:47:28 2005] [notice] SIGHUP received. Attempting to restart
    WARNING: MaxClients of 512 exceeds ServerLimit value of 256 servers,
    lowering MaxClients to 256. To increase, please see the ServerLimit
    directive.
    I've only come across one other thread that talks about this issue and it's because of the number of http requests that are being opened to the server, explains why it usually happens in the weekends cause there is just more traffic to my sites.

    However, it doesn't go in depth or point me to a place where I can learn about increasing these limits.

    I'm pretty sure that I should just be able to change the limits in httpd.conf and restart apache and everything would be ok, but I don't want to mess anything up and cause a long period of downtime for these sites. And aside from that, even if this does happen, shouldn't apache just restart itself? It terminates but never reboots, I have to go in through ssh or plesk and start the server manually.

    I must tell you that I'm kind of new to the whole server administration thing and so I've only gotten this server so I can get myself familiar with it.

    Thanks.
     
  2. editor

    editor Guest

    0
     
    custom configs should only be done with a

    vhost.conf

    which is placed in

    /home/httpd/vhosts/yourdomainname.tld/conf/vhost.conf

    I suggest, that before you will change anything, you should first
    try it with your home-mirror of your Plesk-Server.

    Apache/2.0.51 (Fedora)
    http://httpd.apache.org/docs-2.0/vhosts/

    see also:

    -rw-r--r-- 1 root root 3192 May 7 10:31 httpd.include
    -rw-r--r-- 1 root root 2181 May 5 12:29 httpd.include.bak
    [root@me conf]# vi -R httpd.include

    ----------cut---httpd.include---------
    # ATTENTION!
    # DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
    # FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
    # MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
    # FOLLOWING FILE(S):
    # /home/httpd/vhosts/yourdomain.tld/conf/vhost.conf
    # /home/httpd/vhosts/yourdomain.tld/subdomains/<subdomain-name>/conf/vhost.conf
    ..
    .
    .
    ----------cut---httpd.include---------
     
  3. Hank

    Hank Guest

    0
     
    So if I fix this inside vhosts.conf of the domain that's causing the error, will it fix the apache crash?

    Code:
    <IfModule prefork.c>
    StartServers 8
    MinSpareServers 5
    MaxSpareServers 50
    MaxClients 256
    MaxRequestsPerChild 4000
    </IfModule>
    <IfModule worker.c>
    StartServers 4
    MaxClients 256
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadsPerChild 25
    MaxRequestsPerChild 0
    </IfModule>
    And what if I just want to set the overall server defaults?
     
  4. editor

    editor Guest

    0
     
    I am not 100% sure if this will work. I only know, that Plesk-
    Apache will load all the config-files. And there is a command in
    it to include httpd.include - and if there exist an vhost.conf, then
    also to include this vhost.conf for this one domainname.

    This is why I suggested to test it at first at home with your
    mirror-server before you will do anything on your server in the
    internet.

    BTW: Which Plesk-version? Which Apache/Fedora-Version?
     
  5. Hank

    Hank Guest

    0
     
    7.5.2 RedHat9

    How would I check to see if this worked or not? I would need to wait till the server gets loaded, don't i?
     
Loading...