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

Apache Constant Restart

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by fathomfilm, May 22, 2011.

  1. fathomfilm

    fathomfilm Guest

    Each time a change is made to a subscription or within a user account, the web service goes down. It then restarts. My provider, Media Temple is aware of this as they have had a lot of complaints. I am running Plesk 10 on a dedicated virtual server.

    It seems to me that if I have people signing up for hosting that apache is going to be restarting a lot. That doesn't help anyone who is currently hosting with me nor does it help the new client. If this is some kind of replacement for a CRON job then it's pretty lame.

    I don't expect Parallels to do much about this anytime soon as tech support is pretty poor and getting an answer in the forums is just as hard.

    If ANYONE (Igor) has answer to this problem, a lot of us would be very grateful.

    I am NOT running PLESK Billing (that whole thing was a disaster).
  2. IgorG

    IgorG Forums Analyst Staff Member

    Oct 27, 2009
    Likes Received:
    Novosibirsk, Russia
    Apache Restart Interval - the interval defines minimal gap between two consequent restarts. The interval is zero by default and set into large enough value during backup restoration only (and reset then). Once the interval is set, httpmng will be running as daemon waiting for further attempts. There is apache_restart_interval parameter in table psa.misc (seconds). This interval can be managed in Server Settings GUI.

    You can check httpd log and found mentions about graceful Apache restart. For Graceful restart there is should be something like:

    When you create domain or change hosting settings for domain, Apache will be restarted by /usr/local/psa/admin/sbin/httpdmng utility.
    Look at result time of utility execution for smaller and biggest domain size. For example:

    1. mysql> select name, real_size from domains group by real_size asc limit 1;
    | name | real_size |
    | beles3.22er.fr | 61125 |

    [root@zeta ~]# time /usr/local/psa/admin/bin/httpdmng --reconfigure-domain beles3.22er.fr

    real 0m0.331s
    user 0m0.200s
    sys 0m0.035s

    2. mysql> select name, real_size from domains group by real_size desc limit 1;
    | name | real_size |
    | acc3456g6.22er.fr | 9325597985 |

    [root@zeta ~]# time /usr/local/psa/admin/bin/httpdmng --reconfigure-domain acc3456g6.22er.fr

    real 4m27.262s
    user 0m0.931s
    sys 0m0.364s

    Apache will stop when httpdmng will start and Apache start again when httpdmng will finish.

    For example, from /var/log/httpd/error_log:

    [Sun Feb 06 09:19:43 2011] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!
    [Sun Feb 06 09:19:43 2011] [notice] Apache configured -- resuming normal operations

    As you can see, Apache start again.

    For avoiding immediately Apache restart we recommend you to increase value of "Apache restart interval" in Server Settings GUI.
    I think that now you have it as 0 sec. You can check it with:

    mysql> select * from misc where param like '%interval%';
    | param | val |
    | restart_apache_interval | 0 |

    This means that Apache start immediately once you have any hosting reconfiguration.
    Also I can recommend you increase number of semaphores with method described in http://kb.odin.com/ru/6460
    Try to set kernel.sem = 512 32000 100 512 in file /etc/sysctl.conf and run "sysctl –p" for saving settings.
    Also you can try to change parameter MaxClients in Apache config file (http://httpd.apache.org/docs/2.0/misc/perf-tuning.html).
    Notice, it is only common recommendation. Problem require more detailed and deep investigation directly on your server. Therefore I suggest you contact Parallels Support Team.
  3. fathomvideo

    fathomvideo Guest

    Hmmmmm... thanks for the response but that's not going to work.

    Unfortunately, this is an issue that Parallels created within the new PLESK 10.

    I fixed it.

    You guys will have to find out how and let people know.