Advice on Webserver for Linode 720
I'm pretty limited in my understanding in this area, but so far I've tried reverse proxying nginx to apache but couldn't get it to work, and tried just nginx+spawn-fcgi, but couldn't get that to work either.
My thought was to give Cherokee a try since Linode has a nice tutorial on it, but I don't want to waste another few days messing with it its not going to help.
So, I guess my question is: Would Cherokee help lower my memory footprint and be easy to maintain like Apache, or am I better off just sticking with Apache and stepping up to a bigger linode?
Any help or advice at all is much appreciated.
12 Replies
> I've been hosting a few very low traffic Wordpress blogs using a normal LAMP stack. The blogs are getting a bit more traffic and I've found myself running out of RAM.
A "normal" Lamp stack isn't appropriate for a VPS without some serious tightening of the config files, particularly your my.conf (see /usr/share/doc/mysql-server-5.0/examples) and apache.conf, at the very least. There are gazillions of posts on how to do this, both hereelsewhere
Otherwise, you're just going to need to figure out Nginx/Lighttpd/etc. Seriously, it's not that hard, and there are many here who can help.
Is it safe to assume that because I've followed the articles you pointed out, and am still having memory issues, that my best course of action is to take another stab at nginx/lighttpd?
When I tried nginx I followed this
Installing munin (if you haven't already) should help nail it down, together with the standard cli tools, e.g. ps, top, htop, and scripts like
Essentially, you need to know what is misbehaving (trying to serve too many requests, spending too much time waiting for a response, etc.), else run the risk of just fixing something that wasn't actually the problem.
I have not yet installed munin, I'll do that today. Been using top to asses memory usage and keep clients and servers in Apache under control.
Thanks for your help, it sounds like I jumped the gun and need to do more troubleshooting before asking questions. My apologies.
You should be able to handle many, many more than 120 hits/day – 100 requests/second is quite doable (albeit using httperf to test Drupal on Nginx/fastcgi). If you're running out of ram currently, then there is certainly some more tweaking that can be done.
Good luck, and post back when you've got a bit of data from munin etc.
Have a look at this thread:
Next, check the MaxClients line in apache2.conf, as well as the keybuffer line in my.cnf – these two lines are most often responsible for memory shortages on an out-of-the-box LAMP stack. As a safe default, Apache MaxClients should be below 50 (try 20), and MySQL keybuffer should be below half of your RAM.
I'm thinking this is probably another situation for:
But we'll see after we get back the "free -m" output.
total used free shared buffers cached
Mem: 720 648 71 0 145 359
-/+ buffers/cache: 143 576
Swap: 127 0 127
For Apache I am using prefork with the following
StartServers 2
MinSpareServers 2
MaxSpareServers 5
MaxClients 100
MaxRequestsPerChild 2000
My mysql key_buffer is at 64M
So it sounds like for sure I need to lower my max clients. Am I also misunderstanding how linux reports RAM?
edit: I am running Ubunutu 8.04 LTS
Thanks to everyone for your help, sorry I wasted your time with a server newbie mistake.
@rivalsociety:
Thanks to everyone for your help, sorry I wasted your time with a server newbie mistake.
Don't feel too bad; I've seen experienced admins make the same mistake.