Oct 16 2018

Technical issues

Category: TechnicalIuliana @ 15:07

A few days ago the blog started having hiccups again. And since I’ve lost most of my morning trying out Apache settings and then monitoring it and making sure it stays up. I’ve read the documentation, I’ve consulted stackoverflow and it makes sense why my configurations were wrong, but I cannot understand for the life of me why had the blog been working like this for almost 2 years.

To keep it short, my Apache was configured like this:
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>

<IfModule worker.c>
StartServers 8
MaxClients 256
MinSpareThreads 10
MaxSpareThreads 50
ThreadsPerChild 10
MaxRequestsPerChild 4000
</IfModule>

Not sure if these settings are default, or where have I got them from, but apparently these settings are a little too generous for an AWS micro machine. Because, yes, this is the machine this blog is being hosted on.This means, in case you had doubts: 10 GB HDD and 1 GB or RAM, that MySQL and Apache are fighting over. And apaprently lately Apache is winning.
Anyway, I’ve toned down the following values.
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 14
MaxClients 14
MaxRequestsPerChild 500
</IfModule>

<IfModule worker.c>
StartServers 5
MaxClients 14
MinSpareThreads 10
MaxSpareThreads 50
ThreadsPerChild 10
MaxRequestsPerChild 500
</IfModule>

And the blog has been up all morning. Let’s hope I’ve fixed it, otherwise, I might be forced to upgrade. And I really do not want to do that. I mean, this blog is just a personal project that allows me to practice typing and expressing my ideas in a way other people (maybe!?) can understand. It does not make money, so I’m reluctant to spend too much on keeping it up.  I’ll get into details in a future post, about the costs, advantages, and disadvantages of hosting a site on a virtual machine.

I don’t have many readers, but to the ones that read me, I am really sorry for the blog being down and please bear with it being a little bit slow until I find a solution.

Tags: , ,

Leave a Reply