<?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>Stuff and Nonsense &#187; WordPress</title>
	<atom:link href="http://blog.lesgray.co.uk/categories/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lesgray.co.uk</link>
	<description>Because staying sane is a full time job</description>
	<lastBuildDate>Wed, 16 Jun 2010 19:56:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress Suddenly Slow &#8211; Check your DNS resolution</title>
		<link>http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/</link>
		<comments>http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 21:45:09 +0000</pubDate>
		<dc:creator>Les</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Slowness]]></category>

		<guid isPermaLink="false">http://blog.lesgray.co.uk/?p=84</guid>
		<description><![CDATA[So, in recent weeks I have &#8220;discovered&#8221; and enthusiastically embraced WordPress. I&#8217;m now hosting several blogs. But a couple of days ago I setup a new blog. Same apache config as the others, same server, same WordPress version, no themes or plugins, an absolute virgin install.
It worked. But man alive it was slow. I mean [...]]]></description>
			<content:encoded><![CDATA[<p>So, in recent weeks I have &#8220;discovered&#8221; and enthusiastically embraced WordPress. I&#8217;m now hosting several blogs. But a couple of days ago I setup a new blog. Same apache config as the others, same server, same WordPress version, no themes or plugins, an absolute virgin install.</p>
<p>It worked. But man alive it was slow. I mean S L O O O O O W. Any page took at least 12 seconds (<em>actually almost exactly 12 seconds longer than the login page for example was loading on the other blogs. Comparable pages between fast blogs and slow blog were 12 seconds slower on the duff one</em>) to display (even the login page). Non-php resources such as css, js, images were all loading just as they did on the other blogs (which themselves continued to be speedy).</p>
<p>Anyway, to cut a long story search I Googled myself half to death and found many such reports but no real answers. Usual solution was plugins misbehaving but this didn&#8217;t apply to me or to many others suffering similar problems.</p>
<p>The problem for me turned out to be DNS. Yep, that simple. The blog was at blog.domain.com. My own machine resolved this address perfectly well (obviously since I could see the blog) but a server DNS issue meant that it wasn&#8217;t being resolved on the server (I have root access and was able to ping the domain name from the server itself and witness a failure.) And guess how long it took for a &#8220;ping blog.domain.com&#8221; to time out on the server? 12 seconds.</p>
<p>I sorted the DNS problem and bang, it speeded up just like the other sites. So, it would seem that somewhere in WordPress there is a DNS lookup being done, perhaps gethostbyname() upon the blogs own &#8220;name&#8221;. The blog and the admin etc work perfectly but a failed attempt at name resolution somewhere adds a constant to each page load. The actual duration will depend on individual server resolvers I guess.</p>
<p>This could easily explain some reported problems at various hosting companies. Working blogs suddenly take 30 to 40 seconds to load then time passes and they are ok again. I may venture a patch or a plugin to WordPress to &#8220;fix&#8221; or at least detect this situation. DNS servers do pack up occasionally or a server or LAN DNS server becomes unavailable. YOu wouldn&#8217;t expect WP to have to resolve its own host name but when it can&#8217;t you have a problem.</p>
<p>I&#8217;m off to do a find in files for &#8220;gethostbyname&#8221; and related functions.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/&amp;title=WordPress+Suddenly+Slow+-+Check+your+DNS+resolution" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/&amp;title=WordPress+Suddenly+Slow+-+Check+your+DNS+resolution" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/&amp;title=WordPress+Suddenly+Slow+-+Check+your+DNS+resolution&amp;desc=So%2C%20in%20recent%20weeks%20I%20have%20%22discovered%22%20and%20enthusiastically%20embraced%20WordPress.%20I%27m%20now%20hosting%20several%20blogs.%20But%20a%20couple%20of%20days%20ago%20I%20setup%20a%20new%20blog.%20Same%20apache%20config%20as%20the%20others%2C%20same%20server%2C%20same%20WordPress%20version%2C%20no%20themes%20or%20plugins%2C%20an%20absolute%20virgin%20install.%0D%0A%0D%0AIt%20worked.%20But%20man%20" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/&amp;bm_description=WordPress+Suddenly+Slow+-+Check+your+DNS+resolution&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/&amp;title=WordPress+Suddenly+Slow+-+Check+your+DNS+resolution" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/&amp;title=WordPress+Suddenly+Slow+-+Check+your+DNS+resolution" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/&amp;title=WordPress+Suddenly+Slow+-+Check+your+DNS+resolution" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=WordPress+Suddenly+Slow+-+Check+your+DNS+resolution+-+http://b2l.me/dsjx&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.lesgray.co.uk/2008/11/wordpress-suddenly-slow-check-your-dns-resolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
