Tag

apache Archives - AWS Managed Services by Anchor

Fun and games with Apache’s mod_headers

By | Technical | No Comments

A little while ago we just noticed a customer’s server doing roughly equal amounts of HTTP traffic both inbound and outbound. This isn’t a problem in and of itself, but it’s very activity unusual for HTTP, which is usually heavily biased towards outbound traffic, and the volume of requests was overwhelming the server and making it unresponsive at times. What was going on? For reasons that aren’t worth going into, their website had a flash app that was polling the server for its localtime every few seconds – a handful of bytes in response. Multiplied by a large number of users, that’s a lot of requests. Most customers are billed for the amount of outbound data that they push. This situation was really nothing special, but it got us thinking:…

Read More

PHP on shared hosting – doing it better

By | Technical | No Comments

Large scale shared hosting with an out-of-the-box install of apache and PHP is a recipe for security-disaster; this is not news. The solution is to run each website’s code separately so they can’t affect each other. This is pretty common nowadays but it wasn’t always the case with many providers. Anchor’s been doing this for what must be about ten years now. That’s way longer than I’ve been employed here, but what with our tech-director-and-co-founder being busy stuntjumping his scooter over rows of parked cars, it’s fallen to me to write this one up. We use apache’s mod_suexec to run PHP scripts as though they’re CGI scripts, and it works great. There’s lots of guides out there about how to do this for yourself, but for us one of the…

Read More

Interesting failure modes, episode 2501

By | Technical | No Comments

I got woken up by a SMS for low diskspace the other night on one of our customer’s servers. Okay, so that’s a lie, I never sleep, but the SMS is real. Oh great, they’re making whoopie on their mailing lists again and making some stupidly huge logfile. Little did I know just how huge that file was. How about 735gb huge, in the space of 12hrs? This customer is already a bit of an oddball, what with 1.4TiB of usable space in their server. “Oh that’s nothing”, you say. Sure, I’ve got a few TiB of kitten pictures on my machine at home, just like you, but to put things in perspective: 300GiB of space would be “big” for most Anchor customers. SCSI disks cost about $1.70/Gb, compared to…

Read More

The importance of keeping clean log files

By | Technical | No Comments

I was shoulder-surfing a colleague today while they were trying to diagnose a webserver problem for a client. I noticed, certainly not for the first time, that the Apache error log message was filled with messages like “robots.txt not found” and “favicon.ico not found”. Surely these must be amongst the most frequently logged errors (if not the top two). Multiplied by many hundreds of servers, with millions of hits per day, and you have a significant amount of disk space being taken up by these trivial messages. What’s more, any time you spend scrolling through the hordes of messages like these is time taken away from debugging the real problem, if it exists. So please, be kind to your sysadmin and include a robots.txt and favicon.ico for your website. It…

Read More

Winning the war on PHP memory leakage

By | Technical | No Comments

One of our dedicated server customers recently had a problem with the machine keeling over and dying for a few days in a row, for no apparent reason. This necessitated a remote reboot of the server to get it running again (we cut the power to both power supplies for a few seconds). The immediate suspicion was faulty hardware, but this should rarely be the case as we put our hardware through a thorough “burn in” period before it’s ever deployed. In addition to this, it was happening pretty regularly in the middle of the day. After spotting this pattern, a quick look at our trending graphs showed us the problem very clearly. The machine was steadily using all available physical memory. Once this ran out, the system starts pushing…

Read More