We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
I need to restart web server via cron
I need to restart web server via cron
Hi,
For some reason, these don't work via cron and even in crontab via root
sudo /usr/local/vesta/bin/v-restart-web
sudo service httpd restart
But if I manually run them on ssh, they work.
What am I missing?
For some reason, these don't work via cron and even in crontab via root
sudo /usr/local/vesta/bin/v-restart-web
sudo service httpd restart
But if I manually run them on ssh, they work.
What am I missing?
Re: I need to restart web server via cron
Hi,
For "sudo service httpd restart", what is the exact cron you are using? I would set a custom mailto for that command - something like:
Then when it runs, you should get emailed the output (error message included)
Also, what server type are you using?
Hope that helps
Andy
I'm not sure what that is supposed to do?sudo /usr/local/vesta/bin/v-restart-web
For "sudo service httpd restart", what is the exact cron you are using? I would set a custom mailto for that command - something like:
Code: Select all
[email protected]
@daily sudo service httpd restart
Also, what server type are you using?
Hope that helps
Andy
Re: I need to restart web server via cron
youradds wrote: ↑Sat Apr 04, 2020 2:10 pmHi,
I'm not sure what that is supposed to do?sudo /usr/local/vesta/bin/v-restart-web
For "sudo service httpd restart", what is the exact cron you are using? I would set a custom mailto for that command - something like:
Then when it runs, you should get emailed the output (error message included)Code: Select all
[email protected] @daily sudo service httpd restart
Also, what server type are you using?
Hope that helps
Andy
/bin/systemctl restart httpd.service seems to work on cron.
Reason being is I need to restart apache because my wordpress websites eat a lot of ram.
3 of them to be exact. But it only needs 1 wordpress to crash the system. For some reason, the 3 of them share the same resources. If I disable one of the website, RAM gets freed up.
Ram is 4gb
Restarting apache is my workaround until I come up a way to limit the ram usage for wordpress. But none of the solutions I have found works. This looks like another problem for not related to vesta. But if you can recommend something, I am all ears right here.
As my profile shows, I am running Centos7
Re: I need to restart web server via cron
Hi,
Probably not the answer you were hoping for - but you *really* should update your install Centos 7 is 2014 - so 6 years old. Its end of life is in a couple of months so you will be screwed. Not only will newer versions have better security, you should also find performance better.
Secondly - who do you host with? The type of server you use can also be an issue (I use Linode, and have never had any issues with performance - even with large sites)
Also - I'm more an Ubuntu user myself. Never really got into the other flavors (you stick with what you know :))
UPDATE: Oh, it seems that Centos 8 isn't yet officially supported by Vesta. You may want to look into Ubuntu 18.04 which I'm using on my servers now (I was on 16.04, but recently updated and its bloody awesome and fast!)
Cheers
Andy
Probably not the answer you were hoping for - but you *really* should update your install Centos 7 is 2014 - so 6 years old. Its end of life is in a couple of months so you will be screwed. Not only will newer versions have better security, you should also find performance better.
Secondly - who do you host with? The type of server you use can also be an issue (I use Linode, and have never had any issues with performance - even with large sites)
Also - I'm more an Ubuntu user myself. Never really got into the other flavors (you stick with what you know :))
UPDATE: Oh, it seems that Centos 8 isn't yet officially supported by Vesta. You may want to look into Ubuntu 18.04 which I'm using on my servers now (I was on 16.04, but recently updated and its bloody awesome and fast!)
Cheers
Andy