Evan was in charge of overseeing the integration of Hydra Hosting's seventh and newest acquisition, Calamari. Evan had overseen the last six mergers, and he knew that whether you were integrating with a distant datacenter or moving physical servers into your growing facility, things never went smoothly.
But when Hydra's main datacenter linked up Calamari's, it wasn't just bad. It was catastrophic.
EVAN WHY ARE OUR SERVERS DOWN?! came the text message from the CTO. He didn't even have time to type investigating before getting another twenty texts from twenty different executives, each a refugee from a previous Hydra acquisition.
Of course it's the new servers, Evan thought, logging into the one that was staying up the longest. As the morning progressed he saw that the servers were crashing with regularity. A cron script? He wondered. He poked around, past the undocumented, scattershot web roots and multiple Apache configurations, to the sprawling directory of cron scripts. He found the miscreant:
#!/bin/bash err="Not enough RAM to clear swap." sync echo 1 > /proc/sys/vm/drop_caches echo 2 > /proc/sys/vm/drop_caches echo 3 > /proc/sys/vm/drop_caches mem=`free|grep Mem:|awk '{print $4}'` swap=`free|grep Swap:|awk '{print $3}'` test $mem -lt $swap && echo -e $err && exit 1
The script, if the server was running low on available memory, would clear the cache buffers … which would make the server's performance even worse, since those buffers circumvented a lot of performance bottlenecks. Did the Calamari sysadmins think they were working on a Windows NT machine, instead of a typical LAMP stack? This reeks of Windows thinking.
Disabling that script across all of Calamari's server brought both Calamari's and Hydra's datacenters back up within minutes. Evan breathed easy, but he knew it wouldn't be long. A friend in accounting had already told Evan about another acquisition that Hydra was hunting. Seven heads is already too many, he thought.