Tagged - VPS

Tweaking and tweaking, Apache & MySQL – Not going well.

Monday, January 19th, 2009

These past few days I have been trying to tweak as much as possible with Apache and MySQL to get them to run right on my low memory 128MB VPS. This idea just didn’t work. The amount of traffic hitting my site it just couldn’t put up with. It crashed, crashed, and crashed some more. I didn’t feel like switching EVERYTHING around since ISPConfig doesn’t work with Lighttpd. So, I went the lazy route. I just upgraded the ram from 128MB to 256MB. It *should* be fine now, I will still be tweaking Apache & MySQL a bit more to see which config works the best with my new amount of memory. The VPS is still pretty cheap, I pay about $8/mo. No big deal there.

Remember, it’s not just Apache & MySQL that’s running on this box. I have my ircd, mail, php, ispconfig, the OS etc also running. It all consumes memory :D It’s not that I get a ton of traffic, but when 5-10 people hit my site at once, it goes down.

If anyone can give me suggestions on various MySQL & Apache configs, that would be appreciated, I have scoured the net to look for different configs, and when I find one that works well, I will post it here.

So far, it seems like my problems are pretty much solved, but I’d still like to tweak a bit to get the most out of it.

Thank you. :)

Welcome to the final VPS article.. I think.. :)

Sunday, January 11th, 2009
150p_0c_1b

Yep.

You’ll find that with me, I often take things to an extreme level and I’m not satisfied with people doing things for me. Before I launched this website, I had no previous knowledge of how servers worked. I get curious, and I do things, kind of like a kid. I wanted to know what it was like to manage my own server, without having to pay the high costs associated with dedicated servers.

What have I been doing? I’ve been playing with VPS technology for quite some time now. Now that I have finally set everything up, and learned quite a bit, I would not recommend an unmanaged, no control panel VPS to the average user. Why? Well it’s really not that easy to setup if you don’t know what you’re doing. Especially if you have no Linux knowledge, it might seem downright impossible. I did have past Linux experience, but this did not excuse me from screwing up.

Still, I did not do everything manually. ISPConfig is helping me out with the Bind9 configuration files, FTP, website statistics, e-mail, SSL, etc. ISPConfig isn’t easy to setup in the first place if you’re not familiar with all of the programs it comes with, there is quite a bit of manual configuration that needs to be done *before* you compile ISPConfig. Also, try to not install other control panels before ISPConfig as this WILL cause you problems. Other control panels play with configuration files on all the host essential programs. What’s that mean? Well, when you go in and install ISPConfig after having a previous control panel, some configuration files are messed up, and the program will not work with ISPConfig. My e-mail was screwed up because of this.

Yesterday the site was basically down. Why?

Apache and MySQL seem to think you have unlimited resources, they allocate way more than what you actually need. This caused MySQL to crash, thus causing the database error you may or may not have seen.

If you have a low memory VPS, or any VPS for that matter, you probably need to go in and edit the apache2.conf. It’s not hard to find the values that need to be modified, google it. Next, you’ll want to configure MySQL as well to allocate less resources, it really doesn’t need that much. Again, just google this as well, there are plenty of articles about this. If you’re lazy and don’t know how to use google, here’s an article that basically shows what you need to modify for MySQL and Apache.

These modifications made my server go from crashing constantly, to having plenty of free memory. I don’t know what the default values are for, perhaps sites that are getting an unlimited amount of unique hits per day. I think this is  possibly why people complain about VPS performance being worse than shared – they have yet to properly configure everything.

There you have it. I own my host, I have full control to install whatever software I wish. Something I did not have on my shared host. I have a dedicated IP, I have my own name server. I have my own mail server. All of this for only about $60/year. Amazing, huh?

Of course for regular people I believe shared hosting is the best option :) Either that or get a managed VPS with a control panel.

I have been BUSY

Saturday, January 10th, 2009

Sorry Entrecard and everyone else.. I’ve just been so busy I haven’t even had time to drop. So many things went wrong on my VPS.. So many things I needed to learn, and yet I’m still learning. I must be really rusty with Linux or I’m too used to having a GUI. I think it’s both. Kind of rusty, and really not used to not having a GUI for Linux. Also, the crashing really had nothing to do with the memory on the VPS. Apache just needs to be configured correctly.

I had another problem with my mail on the VPS and I’m sorting that right now – so don’t e-mail admin at technologyinsanity dot com just yet, it’s not working. Instead, e-mail me at admin at s0uthp4rk dot com as it’s still on my old host.

I would be lying if I said I wasn’t having fun playing with my VPS though. It’s great fun. Yea, I’m weird like that.

Normal dropping will continue once I’m sure things are going well on this server. I will probably drop today though after I get some sleep. :)

Thank you for understanding :)

I think webalizer is screwed up it said I got almost 500 visits today – that can’t be right, can it?

e-mail is up.. I guess I’m done? Maybe apache could use a little more tweaking I dunno :) I don’t know who was advertising on me yesterday but I’m willing to give 256EC to that person, because it was NOT a good day :) I also went through and tweaked MySQL, and well I have plenty of memory now :) Only using about 37MB/128MB memory for everything! You could probably grab hosting from me now, don’t see why not. So long as you don’t get more than a few thousand hits a day should be fine I would guess.

I would recommend RapidXen for your VPS needs.

Yes, there are some issues with my VPS.. What fun would it be if there wasn’t?

Friday, January 9th, 2009

Any way the low memory is causing my server to crash, even with my low amount of traffic. It will be upgraded soon though so don’t worry about it too much :P

I’ve went through and tried to kill all unnecessary processes, so let’s hope mysqld doesn’t crash again :) Some of you may have noticed I screw around with my site a lot, sorry :D

I tweaked apache a bit.. I might need a  little more but it seems a bit better now.

UPDATE: Wow a lot better.. I think I’m on to something here :)

UPDATE2: NICE!! Seems as though I’ve found the magic secret… Tweaking Apache.. I’m still going to get the memory upgrade, but now things are going well!

Memory issue solved.. I now have free memory.. Phew!