Jira Courses, Training and Consulting: Sparxsys Trainings
Thanks for coming here, I hope you are enjoying learning here, I have also written some books in case you want to learn a bit more :)
If you need my help with Drupal, Linux, Jira, Scripting, Automation or want to contact me then raise a ticket for me please :) and I will get back to you, promise. At Sparxsys we provide Atlassian consultancy services, reach out to me at ravi at sparxsys dot com

Graceful restart of Apache Server - No downtime, Happy Clients

Graceful Restart Apache

I have been using webfaction for so many years and it is definitely one of the best shared hosting service I have ever used but since last year I felt the need to host sites on a VPS, there are certain things that you can only do when you have full control of the server. The problem with shared hosting is that you can't just do everything (but in most cases they are good enough). Also they RAM they offer is not enough sometimes.

Also our tech savvy clients want to use VPS and good that they are willing to pay for it too :) so that's why we started using VPS last year. When I researched about VPS hosting I narrowed down linode, it is not only affordable but also there support is good, they also have lot of online guides.

Apart from client websites we also use couple of linode machines for hosting our JIRA instance and our internal projects.

Earlier I used Ubuntu which is the most common choice of people but my lack of experience on Ubuntu and my personal love for Fedora and Cent OS forced me to select Cent OS. Also good thing about linode is that they upgrade your machines from time to time. Just recently they upgraded the RAM to 2GB on their basic plan. It is awesome now, especially our JIRA instance is running smooth without downtime.

Managing VPS is not for everyone. I have years of experience working on linux but when it comes to managing a server that will host your client's site, you just can't do thing you usually do on your linux machine locally. For instance you have to manage the memory, make sure there are no unnecessary processes running and you should be able to look into log files.

Most importantly you just can't afford to have downtimes. Clients don't like it and asking them for a downtime is embarrassing for us too.

I am not really an expert on managing Apache but this what I use for reloading the apache on cent OS. Apache needs to be reloaded whenever you do any changes in the httpd.conf or your vhost.conf files or you add a new site.

This command will apply the configuration changes.

  1. /etc/init.d/httpd reload

You can also do.

  1. /etc/init.d/httpd graceful

Both reload and graceful will apply the changes in the configuration without terminating / interrupting any connections. Simple the Apache will first process the request, complete it and then restart, so server will eventually restart but users should not see downtime. Well so far it serves our purpose but there could be a better way.

In any case this is better than full restart, ever since I moved to VPS, we have more power but more tensions too :) though it is good that we learn new things. Hopefully one day when our company Sparxsys grows we will hire an experience server administrator, till then I will have to learn more and manage the servers myself. Why not? An additional role for me.

That is the challenge and fun working in a startup, you wear multiple hats and manage tons of different things.

The problem with this command is that it will immediately terminate all the request currently handled by Apache.

Similar posts

Subscribe

* indicates required

Please confirm that you would like to from Sparxsys:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices.

Want to contact me?