Hacker News new | past | comments | ask | show | jobs | submit login

i hope my linode doesn't crash again...

edit: reboot #1. this is like monday all over again. i'm resizing my linode to 4gb now, then will install wpcache. will be back up in 4 min.

edit: wow, that was like 20 minutes of downtime. it should be working now.




A tip for when you have a spare half hour - switch from Apache to nginx :)

Let me convince you as to why: I have a 1GB VPS with prgmr.com, and it's comfortably survived being top story on the Hacker News homepage, all whilst running my regular web apps running in the background.

Edit: If you're feeling really brave (or foolish - always a thin line), you could try setting up nginx now on a random port (e.g. 8080), and if it looks OK, kill Apache and move nginx to port 80. All depends on how much your server is struggling - would it be worth 20 mins downtime now if you don't have to worry about it again?

Edit 2: Looks like you're using Wordpress - are you using a cache plugin as well? If not, install W3 Total Cache right this very instant :) If you'd like any help with this, I'll be around for the next couple of hours, email is in my profile :)


Good advice but still not entirely necessary. I run several VMs and dedicated servers and have had numerous HN front pages and other high traffic leads to 1GB VMs running Apache (WordPress without caching, even). The issue here seems to be a less than optimal Apache configuration and not having just enough memory to handle the requests properly (but 1GB seems to be a sweet spot for a regular Apache setup nowadays).


Good advice but still not entirely necessary

The issue here seems to be a less than optimal Apache configuration

I couldn't agree with you more. The problem is my Apache knowledge pretty much well starts and ends with setting up virtual hosts. A year ago I was having serious issues with my Apache set up, and spent hours trying to reduce its memory footprint, and playing with lots of other settings, all to no avail. So I gave up, installed nginx... and it just worked. Which is why I'm so evangelical about it :)

That said, I'm certainly not against Apache; just the setup time and my abject failure. Which is, most likely, incompetence ;)


Yeah, Apache is like a giant lump of clay you need to "sculpt" into something useful, whereas nginx is a fast and empty potter's wheel waiting for you to throw the clay on ;-) nginx is definitely well worth it if you don't have complex Apache-specific requirements.

Another alternative I've been playing with lately is running haproxy on port 80 and then throwing requests to different daemons (like Apache and nginx) based on the host header.


i noticed phusion passenger is supported on nginx as well, i'll look into doing this. thanks, hopefully this will work nicely on the 512 that i had with linode.

also, i'm installing w3 cache right now. you'll probably hear from me.


This advice may or may not be helpful, but I have survived plenty of traffic spikes from HN etc on low RAM machines by turning Keepalive Off in the apache config file. It is on by default with a long timeout, which will tie up all the resources during heavy traffic. Lots of people don't even know about it, so hopefully this will be helpful. (this assumes, of course, you are using apache, but other http servers have similar settings)


i changed it to that, although my apache log files aren't really giving me anything helpful. where are the cloudkick guys when you need them? ;)


Do you use munin or similar monitoring tools? Jazzychad's suggestion will only help you if your apache server is fully saturated, so these monitoring tools would instantly confirm or refute the notion. I completely agree that jazzychad's suspicions are correct, by the way.


no, but i'm going to set that up. thank you. i also realized linode is nothing like the way heroku works--that resize costed me $140. definitely not a cost-effective way to deal with traffic. i'll see if i can get it pro-rated with them since i'm only doing it for one day, and then i'll setup wpcache.


It is pro-rated. When you resize back a credit for the unused time will be credited. You paid for May is why it cost so much.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: