<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tim Linden Blog &#187; Server Administration</title>
	<atom:link href="http://www.timlinden.com/blog/category/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.timlinden.com/blog</link>
	<description>feels like you punching me in face with orange</description>
	<lastBuildDate>Thu, 09 Feb 2012 11:52:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Trying out CloudFlare</title>
		<link>http://www.timlinden.com/blog/server/trying-out-cloudflare/</link>
		<comments>http://www.timlinden.com/blog/server/trying-out-cloudflare/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 11:57:59 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.timlinden.com/blog/?p=2776</guid>
		<description><![CDATA[I've been trying out a service called CloudFlare on my blog and ClickTrackProfit. The goal of CF is to add a layer of security to your website. It blocks bots, spammers, and viruses from even getting to your server. So it's like a firewall. But at the same time it caches your static content like [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px; clear: both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Ftrying-out-cloudflare%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Ftrying-out-cloudflare%2F&amp;source=timlinden&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I've been trying out a service called <a href="http://www.cloudflare.com" target="_blank">CloudFlare</a> on my blog and ClickTrackProfit. The goal of CF is to add a layer of security to your website.</p>
<p>It blocks bots, spammers, and viruses from even getting to your server. So it's like a firewall. But at the same time it caches your static content like images and javascripts. So it's like a CDN.</p>
<p>To my surprise it's worked very good and was incredibly easy to setup. All you do is transfer your DNS to them, and they take care of the rest. It's like magic. It's been working so great and easy that I thought it wasn't doing anything!</p>
<p>But it is, and it's reduced the load by about 50%. A small fraction is the bots being blocked, but the majority is the system caching content making it faster and reducing our bandwidth bill. Cool!</p>
<p>Without going into details, I haven't tried it with any of our <a href="http://www.timlinden.com/blog/traffic-exchanges/manual-traffic-exchange/"  class="alinks_links" title="What are manual traffic exchanges?"  >traffic exchanges</a>. We have a unique situation where at the present time CloudFlare wouldn't work with our setup, but I am working on it so we can. The benefits so far have been worth it!</p>
<img src="http://www.timlinden.com/blog/?ak_action=api_record_view&id=2776&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.timlinden.com/blog/server/trying-out-cloudflare/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>You never stop learning</title>
		<link>http://www.timlinden.com/blog/server/you-never-stop-learning/</link>
		<comments>http://www.timlinden.com/blog/server/you-never-stop-learning/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 16:24:55 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.timlinden.com/blog/?p=2655</guid>
		<description><![CDATA[Geek Alert! Geek Alert! Geek Alert! That's my way of saying Jon Olson stop reading you'll bore yourself to death but please till retweet anyways! The past few hours I've been unlearning or relearning a tactic I've been using to make things faster. Turns out, you can make it slower by making it faster. Understand [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px; clear: both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Fyou-never-stop-learning%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Fyou-never-stop-learning%2F&amp;source=timlinden&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Geek Alert! Geek Alert! Geek Alert! That's my way of saying <a href="http://www.timlinden.com/blog/recommends/jon-olson" style="padding-right: 13px; background: url(http://www.timlinden.com/blog/wp-content/plugins/alinks/images/external.png) center right no-repeat;" title="JON OLSON" rel="external" target="_blank">Jon Olson</a> stop reading you'll bore yourself to death but please till retweet anyways!</p>
<p>The past few hours I've been unlearning or relearning a tactic I've been using to make things faster. Turns out, you can make it slower by making it faster. Understand that? Neither did I.</p>
<p>So let's get the story started. Well, we use a super cluster for our <a href="http://www.liquidweb.com/?RID=timtech"  class="alinks_links" title="I can't recommend LiquidWeb enough!"  style="padding-right: 13px; background: url(http://maxcdn.timlinden.com/images/external_red.png) center right no-repeat;" rel="external">hosting</a>. It's a rock solid, never goes offline type cluster. Super cool right? Well a few days ago I noticed it was starting to act slow*. In fact, everyone did. Not cool.</p>
<p>Come to find out, I've been using APC Cache in PHP. Well I was actually over using it. It was slowly eating up RAM in our web servers, and maybe even leaking it. I know in the past bug fixes said it did it, I don't know if it was or not (I'm not <em>that</em> nerdy). Anyways, all this time I've been using it to the max not realizing how much RAM it was using up. And funny enough our cluster is so fast it's faster NOT using it.</p>
<p>So now I get to go through all the code and decide which places to remove it. Yay! It's actually not been that bad, but every single time I find it used and I have to rewrite code it's like a huuuge reminder it was my bad! Thankfully our server people are super cool and don't get upset when we get on the phone with them and have conference calls with their team only to find out it was me.</p>
<p>The moral of the story I guess is to keep an eye on *EVERYTHING*. Especially when you keep growing like we are, the slightest changes can have the craziest effects. We're up to 1,330 queries per second on our DB server now. Huya!</p>
<p>*Disclaimer: I put it at the bottom because Jon's not gonna read this far, but he <em>did</em> tell me it was acting slow a week or so ago but I didn't notice it so I thought it was silly Canadian internet speeds. I mean c'mon Canada, you should have 31/21 innernets too..</p>
<p><img class="aligncenter" title="Tim Supa Fast Innernets" src="http://www.speedtest.net/result/1599293978.png" alt="" width="300" height="135" /></p>
<img src="http://www.timlinden.com/blog/?ak_action=api_record_view&id=2655&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.timlinden.com/blog/server/you-never-stop-learning/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>To Exchange Owners Everywhere</title>
		<link>http://www.timlinden.com/blog/server/to-exchange-owners-everywhere/</link>
		<comments>http://www.timlinden.com/blog/server/to-exchange-owners-everywhere/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 00:57:00 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.timlinden.com/blog/?p=1554</guid>
		<description><![CDATA[I just found out about an exchange that lost it's database, and the only good backup was from a few months ago. This is not good! So I thought it was a good time to remind all the owners out there to do backups! Here are some things to consider: Downloading your files via FTP [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px; clear: both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Fto-exchange-owners-everywhere%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Fto-exchange-owners-everywhere%2F&amp;source=timlinden&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I just found out about an exchange that lost it's database, and the only good backup was from a few months ago. This is not good! So I thought it was a good time to remind all the owners out there to do backups! Here are some things to consider:</p>
<ul>
<li>Downloading your files via FTP is NOT backing up your MySQL database. Just the files.</li>
<li>While many hosts will say they do backups for you, most will say they aren't responsible for keeping backups. Read the fine print.</li>
<li>The backups need to be daily at a minimum.</li>
<li>The backups need to be automated. If it's not automatic, it will get forgotten and statistically right before you need them.</li>
<li>Once automated you should be checking that the backups are being saved regularly. Automated things stop working all the time!</li>
<li>RAID is not enough.</li>
</ul>
<p>You'll also want to be sure your backups are in multiple locations. For example, some servers have multiple drives on them. So your first thought is to have one backup drive, one live drive right? WRONG. Doing that is a good idea, but it still leaves one point of failure: the server. Ideally you should have multiple layers of protection:</p>
<ol>
<li>RAID 1, 5, or 10. This uses multiple drives with redundancy. If one of them dies the data is still there. I've never had a hard drive fail on me completely before, but I have had a server drive start warning me it was going to die. If that were to happen, you can rebuild your RAID array and have your data back as it was.</li>
<li>On Site. Many server providers have storage available for backups. This is great because if you need to grab the backup, its in their network so it should be much faster to restore than uploading from outside the network.</li>
<li>Remote Location. This is a must, you want a copy of your backups outside of your <a href="http://www.liquidweb.com/?RID=timtech"  class="alinks_links" title="I can't recommend LiquidWeb enough!"  style="padding-right: 13px; background: url(http://maxcdn.timlinden.com/images/external_red.png) center right no-repeat;" rel="external">host</a>'s network. So if they really get knocked out you can restore it on another host. Remember when The Planet caught on fire and half the exchanges were offline for hours? What if a fire destroyed your server and the backup server on site? I use Amazon S3 because it's reliable and cheap.</li>
<li>Your own office. Sometimes things can go wrong, and there is nothing better than having a copy locally. It also makes you feel alot better knowing you've got it right there with you.</li>
</ol>
<p>So what do I do? Well I told you - <a href="http://www.timlinden.com/blog/server/backup-mysql-amazon-s3/" target="_blank">Backup MySQL to Amazon S3</a> - but in addition I also have it FTP a copy to my office where I have a ReadyNAS Pro running 24/7 on a battery backup [UPS]. I can easily check the backups, open them up and make sure it's all good, and it's 100% automated. This unit itself has RAID so I'm covering my bases as much as possible. You really can't have too many backups in place!</p>
<img src="http://www.timlinden.com/blog/?ak_action=api_record_view&id=1554&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.timlinden.com/blog/server/to-exchange-owners-everywhere/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How To Backup MySQL to Amazon S3</title>
		<link>http://www.timlinden.com/blog/server/backup-mysql-amazon-s3/</link>
		<comments>http://www.timlinden.com/blog/server/backup-mysql-amazon-s3/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 19:36:51 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.timlinden.com/blog/?p=933</guid>
		<description><![CDATA[There are all sorts of ways to backup MySQL to Amazon S3 floating around the interent, but the only problem is that many of them require all sorts of things. I wanted to have my MySQL database on my WHM/cPanel server backed up automatically to Amazon S3, in the easiest way possible. Here's what I [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px; clear: both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Fbackup-mysql-amazon-s3%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Fbackup-mysql-amazon-s3%2F&amp;source=timlinden&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There are all sorts of ways to backup <strong>MySQL</strong> to <strong>Amazon S3</strong> floating around the interent, but the only problem is that many of them require all sorts of things.  I wanted to have my MySQL database on my WHM/cPanel server backed up automatically to Amazon S3, in the easiest way possible. Here's what I did:</p>
<p><strong>Get Amazon S3</strong></p>
<p><img class="alignright alignnone size-full wp-image-934" style="float: right;" title="amazons3" src="http://timlinden.s3.amazonaws.com/blog/wp-content/uploads/amazons3.png" alt="" width="193" height="82" />It's dead cheap and way easy to signup. There is a button to the right of <a href="http://www.amazon.com/gp/browse.html?node=16427261" target="_blank">this page</a>. Once you have it all ready to go, hover over the "Your Web Services Account" and click the "AWS Access Identifiers" link. This is where you can get the secret code and access key needed later on.</p>
<p><strong>Install Net::Amazon::S3</strong></p>
<p>This you may or may not have to do, but it's way easy with WHM. Just login, on the left menu find "Install a Perl Module". Then enter Net::Amazon::S3 and click search. It found 3 items for me, just click on the one that says "Net::Amazon::S3". Hard wasn't it?</p>
<p><strong>Install BackupManager</strong></p>
<p>Note that I'm using the <em>Devel</em> 0.7.9 version because it supports S3. The commands below were via SSH logged in as root.</p>
<ol>
<li># <span style="color: #339966;">wget http://www.backup-manager.org/download/backup-manager-0.7.9.tar.gz</span></li>
<li># <span style="color: #339966;">gzip -d backup-manager-0.7.9.tar.gz</span></li>
<li># <span style="color: #339966;">tar -xvf backup-manager-0.7.9.tar</span></li>
<li># <span style="color: #339966;">cd backup-manager-0.7.9</span></li>
<li># <span style="color: #339966;">make install</span></li>
<li># <span style="color: #339966;">cp /usr/share/backup-manager/backup-manager.conf.tpl /etc/backup-manager.conf</span></li>
</ol>
<p><strong>Configure BackupManager</strong></p>
<p>There is a whole bunch of configuration options available, but I'll only go through the options to *only* backup a <em>MySQL database</em> and *only* send it to <em>Amazon S3</em>. This should be enough to get you started.</p>
<ol>
<li># <span style="color: #339966;">pico -w /etc/backup-manager.conf</span></li>
<li>Use <span style="color: #339966;">CTRL + W</span> to find the text below, and change accordingly. Bold text is what you want to change to your specific settings.</li>
</ol>
<ul>
<li>export BM_ARCHIVE_METHOD="mysql"</li>
<li>export BM_MYSQL_DATABASES="<strong>dbname1</strong> <strong>dbname2 dbname3</strong>"</li>
<li>export BM_MYSQL_ADMINLOGIN="<strong>mysqlusername</strong>"</li>
<li>export BM_MYSQL_ADMINPASS="<strong>mysqlpassword</strong>"</li>
<li>export BM_UPLOAD_METHOD="s3"</li>
<li>export BM_UPLOAD_S3_DESTINATION="<strong>s3bucketname</strong>"</li>
<li>export BM_UPLOAD_S3_ACCESS_KEY="<strong>s3accesskey</strong>"</li>
<li>export BM_UPLOAD_S3_SECRET_KEY="<strong>s3secretkey</strong>"</li>
</ul>
<ol>
<li>Press <span style="color: #339966;">CTRL + X</span> to close and "<span style="color: #339966;">Y</span>" to save</li>
</ol>
<p><strong>Sneaky Secret<br />
</strong></p>
<p>This will only work if you have *all* InnoDB tables. If you do, and you want backups to not stall your server, let's get your hands dirty:</p>
<ol>
<li># pico /usr/share/backup-manager/backup-methods.sh</li>
<li>CTRL+W (search for --opt)</li>
<li>Replace "--opt" with "--opt --single-transaction"</li>
<li>CTRL+X to close and "Y" to save</li>
</ol>
<p>This will turn on snapshot backups. InnoDB is able to take a snapshot of the entire database and dump it without locking the tables. This is the difference between your server database holding up the entire server and things running as if no backup is running. Some day I'll contact the backup-manager people to have them put it in..</p>
<p><strong>Run Configure BackupManager</strong></p>
<p>The first time you run it, you want to do it while you are there with verbose turned on. This way if any errors happen, you'll know right away. To run it simply type:</p>
<ol>
<li>#<span style="color: #339966;"> /usr/sbin/backup-manager --verbose</span></li>
</ol>
<p><strong>Setup the Cron Job</strong></p>
<p>If that runs without any errors, then the next step is to setup your cron jobs. Type the following, substituting the bold <strong>45</strong> for the minute you want it to run, and the bold <strong>1</strong> for the hour you want it to run. Remove <strong>--verbose</strong> if you don't want to get emails with all the details.</p>
<ol>
<li># <span style="color: #339966;">crontab -e</span></li>
<li>press <span style="color: #339966;">o</span></li>
<li>type<strong> </strong>"<span style="color: #339966;"><strong>45</strong> <strong>1</strong> * * * /usr/sbin/backup-manager <strong>--verbose</strong></span>"</li>
<li>press <span style="color: #339966;">esc</span></li>
<li>type <span style="color: #339966;">ZZ</span> to save or <span style="color: #339966;">:q!</span> to quit if you make a mistake</li>
<li># <span style="color: #339966;">crontab -l</span></li>
</ol>
<p>The last command should list all your cron jobs. If it looks good, your golden. Just don't forget that the quotes are <em>not</em> part of the command. You are typing what is inside the quotes.</p>
<p><strong>Accessing your Files with Firefox</strong></p>
<p>Well this is the kicker..  Accessing the files with <a href="http://www.rjonna.com/ext/s3fox.php" target="_blank">S3 Firefox Organizer</a> is way easy. It's a plugin that sits in your bottom status bar of Firefox and you can just click it anytime and see your files. You can easily use it to synchronize folders on your computer too (so you can easily download those backups anytime!).</p>
<img src="http://www.timlinden.com/blog/?ak_action=api_record_view&id=933&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.timlinden.com/blog/server/backup-mysql-amazon-s3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Installing APC Cache on Media Temple</title>
		<link>http://www.timlinden.com/blog/server/installing-apc-cache-on-media-temple/</link>
		<comments>http://www.timlinden.com/blog/server/installing-apc-cache-on-media-temple/#comments</comments>
		<pubDate>Fri, 23 May 2008 21:12:19 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.timlinden.com/blog/?p=914</guid>
		<description><![CDATA[I think it's really cool that with Media Temple (dv) you have your own defined amount of ram. This means you can fully utilize that memory to the max! The first thing I did when I got my account was installed APC Cache. What is APC Cache? Well it is an opcode cache. The gist [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px; clear: both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Finstalling-apc-cache-on-media-temple%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Finstalling-apc-cache-on-media-temple%2F&amp;source=timlinden&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I think it's really cool that with <strong>Media Temple</strong> (dv) you have your own defined amount of ram. This means you can fully utilize that memory to the max! The first thing I did when I got my account was installed <strong>APC Cache</strong>.</p>
<p>What is <a href="http://pecl.php.net/package/APC" target="_blank">APC Cache</a>? Well it is an opcode cache. The gist of it is this.. It stores your PHP scripts in the server's memory <em>already compiled</em>. This means the next time someone hits that page, it only has to execute. It doesn't need to load all the files up which saves on disk speed and it doesn't need to compile everything which saves on CPU usage. It can really make things <em>fast</em>.</p>
<p><strong>1. Setup Root Access</strong></p>
<p>Goto the "<em>Root Access &amp; Developer Tools</em>" page inside the Media Temple AccountCenter. You'll need to login to the server with root access to edit the proper files. Make sure your password is *ultra secure*.</p>
<p><strong>2. SSH Into the Server and Install APC<br />
</strong></p>
<p>Download <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">Putty</a> if you don't have an SSH program. Once logged in type the following commands:</p>
<ul>
<li><span style="color: #339966;">cd /usr/local/src</span></li>
<li><span style="color: #339966;">wget http://pecl.php.net/get/APC-3.0.19.tgz</span></li>
<li><span style="color: #339966;">gunzip -c APC-3.0.19.tgz | tar xf -</span></li>
<li><span style="color: #339966;">cd APC-3.0.19</span></li>
<li><span style="color: #339966;">./configure --enable-apc --enable-apc-mmap --with-apxs2=/usr/sbin/apxs --with-php-config=/usr/bin/php-config</span></li>
<li><span style="color: #339966;">make</span></li>
<li><span style="color: #339966;">make install</span></li>
</ul>
<p>Note that each bullet is a one line command. That really long one you'll have to ensure is all on one line.</p>
<p><strong>3. Edit php.ini to tell PHP to use APC</strong></p>
<ul>
<li><span style="color: #339966;">vi +/extension_dir /etc/php.ini</span></li>
<li>press <span style="color: #339966;">i</span></li>
<li>press <span style="color: #339966;">enter</span> to start a new line</li>
<li>type <span style="color: #339966;">extension = "apc.so"</span></li>
<li>press <span style="color: #339966;">esc</span> and then type <span style="color: #339966;">:wq</span> to exit and save (if you mess up type :q! to quit without saving)</li>
<li><span style="color: #339966;">service httpd stop</span></li>
<li><span style="color: #339966;">service httpd start</span></li>
</ul>
<p>That should do it! It's pretty simple indeed, but the effect is huge. If you are using WHM/Cpanel I recommend the instructions <a href="http://www.vbulletin.com/forum/showthread.php?t=165367" target="_blank">here</a>.</p>
<img src="http://www.timlinden.com/blog/?ak_action=api_record_view&id=914&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.timlinden.com/blog/server/installing-apc-cache-on-media-temple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache KeepAlive &amp; Traffic Exchanges</title>
		<link>http://www.timlinden.com/blog/server/apache-keepalive-traffic-exchanges/</link>
		<comments>http://www.timlinden.com/blog/server/apache-keepalive-traffic-exchanges/#comments</comments>
		<pubDate>Tue, 03 Apr 2007 15:19:27 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.timlinden.com/blog/server/apache-keepalive-traffic-exchanges/</guid>
		<description><![CDATA[This tip goes out to all the traffic exchange owners out there who are wondering why their massive server can't handle the load. Apache has a feature called KeepAlive. Basically this keeps the connection alive for all the requests a computer has. IE: the page, all the images, etc. This is great, however by default [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px; clear: both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Fapache-keepalive-traffic-exchanges%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.timlinden.com%2Fblog%2Fserver%2Fapache-keepalive-traffic-exchanges%2F&amp;source=timlinden&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This tip goes out to all the <a href="http://www.timlinden.com/blog/traffic-exchanges/manual-traffic-exchange/"  class="alinks_links" title="What are manual traffic exchanges?"  >traffic exchange</a> owners out there who are wondering why their massive server can't handle the load.</p>
<p>Apache has a feature called KeepAlive. Basically this keeps the connection alive for all the requests a computer has. IE: the page, all the images, etc.</p>
<p>This is great, however by default it keeps the connection open for 15 seconds (<strong>KeepAliveTimeout</strong>). With surfbars being 15 seconds and under, this is essentially keeping all the connections open for each user surfing. The end result is apache using up all it's connections.</p>
<p>You can increase your max connections, but that will require more memory and all the other jazz. Or you can change the time down. I set mine to 3 seconds, because the surfbar should be loaded within 3 seconds. If it takes longer, it just recreates the connection. The end result is less connections being open all the time, and the server can handle more visitors faster.</p>
<p>To change it, you'll need to edit your httpd.conf file</p>
<p><strong>Update:</strong> I actually turn KeepAlive completely off now. It makes high traffic sites load better ;-)</p>
<img src="http://www.timlinden.com/blog/?ak_action=api_record_view&id=701&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.timlinden.com/blog/server/apache-keepalive-traffic-exchanges/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic

Served from: www.timlinden.com @ 2012-02-09 19:13:02 -->
