• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

How to setup a cronjob for apache restart

W

wattie

Guest
Recently my apache is overloading the server and I don't know why. It has to be restarted on regular basis (every day) to keep the server stable...

What exactly I need to write as a cron job to have this done? I am on freeBSD 6. I tried "5 9 * * * /usr/local/psa/apache/bin/apachectl restart ", but it doesn't seem to work
 
Well, you should figure out why it's overloading, rather than fixing it with a bandaid (restart), but try this:

5 9 * * * root /usr/local/psa/apache/bin/apachectl restart

Originally posted by wattie
Recently my apache is overloading the server and I don't know why. It has to be restarted on regular basis (every day) to keep the server stable...

What exactly I need to write as a cron job to have this done? I am on freeBSD 6. I tried "5 9 * * * /usr/local/psa/apache/bin/apachectl restart ", but it doesn't seem to work
 
Actually more new information is comming - this is not related to crontab itself anymore.

1. When I use "Restart" on "Web Server (Apache)" using the Service Management in Plesk - the usage falls
2. When I execute "/usr/local/psa/apache/bin/apachectl restart" via SSH the usage do not falls that much

Question: What "restart web server (apache)" in Plesk actually do?


P.S. Of course locating the root of the problem is the correct solution. I am just raising different type of question here



Got it - it's not just apachectl restart, but instead we should use httpd restart in rc.d
 
Back
Top