• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Apache Constant Restart

F

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).
 
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:

[Sun May 08 13:23:58 2011] [notice] Graceful restart requested, doing restart <======= START OF GRACEFUL RESTART
[Sun May 08 13:23:58 2011] [notice] Digest: generating secret for digest authentication ...
[Sun May 08 13:23:58 2011] [notice] Digest: done
[Sun May 08 13:23:58 2011] [notice] mod_bw : Memory Allocated 0 bytes (each conf takes 32 bytes)

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.
 
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.
 
Back
Top