<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: MySQL Server Has Gone Away problem solved</title>
	<atom:link href="http://terry.ipearson.net/2008/02/29/mysql-server-has-gone-away-problem-solved/feed/" rel="self" type="application/rss+xml" />
	<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/</link>
	<description>Articles for those who think. By Terry Pearson</description>
	<lastBuildDate>Tue, 07 Feb 2012 13:55:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Terry</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-409</link>
		<dc:creator>Terry</dc:creator>
		<pubDate>Tue, 06 Sep 2011 18:29:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-409</guid>
		<description>Good point Sandcarving. If you have a dedicated VPS or Server, you can do just that. You can also adjust the timeout settings at that point.

However, if you are on a shared host, the problem is probably not a failure of the MySQl server, it is just a timeout issue, of which you have no control in a shared environment.</description>
		<content:encoded><![CDATA[<p>Good point Sandcarving. If you have a dedicated VPS or Server, you can do just that. You can also adjust the timeout settings at that point.</p>
<p>However, if you are on a shared host, the problem is probably not a failure of the MySQl server, it is just a timeout issue, of which you have no control in a shared environment.</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-409" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('409', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-409-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-409" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('409', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-409-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sandcarving</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-406</link>
		<dc:creator>Sandcarving</dc:creator>
		<pubDate>Mon, 05 Sep 2011 16:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-406</guid>
		<description>I ran into this same error this morning. The resolution was just restarting our MySQL service on the service and the error went away immediately.</description>
		<content:encoded><![CDATA[<p>I ran into this same error this morning. The resolution was just restarting our MySQL service on the service and the error went away immediately.</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-406" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('406', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-406-up" style="font-size:12px; color:#009933;">1</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-406" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('406', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-406-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: William Johnson</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-283</link>
		<dc:creator>William Johnson</dc:creator>
		<pubDate>Sat, 18 Dec 2010 14:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-283</guid>
		<description>Actually the problem with GoDaddy servers and most others having this problem is quite simple to fix if you have root access to the server. Clear everything out of etc/my.cnf and replace with

[mysqld]
set-variable = max_connections=500
safe-show-database
query-cache-type = 1
query-cache-size = 20M

Then restart sql. 

The &quot;MySQL Server Has Gone Away&quot; issue will... well... go away.</description>
		<content:encoded><![CDATA[<p>Actually the problem with GoDaddy servers and most others having this problem is quite simple to fix if you have root access to the server. Clear everything out of etc/my.cnf and replace with</p>
<p>[mysqld]<br />
set-variable = max_connections=500<br />
safe-show-database<br />
query-cache-type = 1<br />
query-cache-size = 20M</p>
<p>Then restart sql. </p>
<p>The &#8220;MySQL Server Has Gone Away&#8221; issue will&#8230; well&#8230; go away.</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-283" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('283', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-283-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-283" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('283', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-283-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Terry</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-265</link>
		<dc:creator>Terry</dc:creator>
		<pubDate>Tue, 19 Oct 2010 14:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-265</guid>
		<description>Imran, check out the comment by &quot;Yo&quot; on this post. I think his theory about random port changes is correct. 

I would say you could probably close the connection at the end of the page load. The most important thing is that you do not want to have an open connection through a port that has been changed randomly by GoDaddy. So if &quot;Yo&#039;s&quot; theory is correct, you should be fine with closing the SQL connection at the end of a page load.</description>
		<content:encoded><![CDATA[<p>Imran, check out the comment by &#8220;Yo&#8221; on this post. I think his theory about random port changes is correct. </p>
<p>I would say you could probably close the connection at the end of the page load. The most important thing is that you do not want to have an open connection through a port that has been changed randomly by GoDaddy. So if &#8220;Yo&#8217;s&#8221; theory is correct, you should be fine with closing the SQL connection at the end of a page load.</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-265" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('265', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-265-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-265" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('265', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-265-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Imran</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-264</link>
		<dc:creator>Imran</dc:creator>
		<pubDate>Tue, 19 Oct 2010 13:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-264</guid>
		<description>I have the same problem hosting on godaddy, though using druapl install.  So I can&#039;t use your total fix.  But I&#039;m hoping that I can get some tips from what you&#039;ve done.

Are you essentially saying that I need to call mysql_close after every database request that my site makes?  Or do I need to call it explicitly when my page has finished generating?</description>
		<content:encoded><![CDATA[<p>I have the same problem hosting on godaddy, though using druapl install.  So I can&#8217;t use your total fix.  But I&#8217;m hoping that I can get some tips from what you&#8217;ve done.</p>
<p>Are you essentially saying that I need to call mysql_close after every database request that my site makes?  Or do I need to call it explicitly when my page has finished generating?</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-264" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('264', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-264-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-264" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('264', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-264-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Brooke Morris</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-143</link>
		<dc:creator>Brooke Morris</dc:creator>
		<pubDate>Wed, 05 May 2010 07:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-143</guid>
		<description>I have 100 domains on Godaddy and i can say that this company is very reputable.&quot;-.</description>
		<content:encoded><![CDATA[<p>I have 100 domains on Godaddy and i can say that this company is very reputable.&#8221;-.</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-143" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('143', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-143-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-143" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('143', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-143-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: iGuide</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-142</link>
		<dc:creator>iGuide</dc:creator>
		<pubDate>Thu, 17 Sep 2009 19:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-142</guid>
		<description>So, what&#039;s the configuration option that needs to be changed to solve this problem?</description>
		<content:encoded><![CDATA[<p>So, what&#8217;s the configuration option that needs to be changed to solve this problem?</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-142" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('142', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-142-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-142" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('142', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-142-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: mine</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-141</link>
		<dc:creator>mine</dc:creator>
		<pubDate>Tue, 21 Oct 2008 23:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-141</guid>
		<description>It works for me.
Thanks alot.</description>
		<content:encoded><![CDATA[<p>It works for me.<br />
Thanks alot.</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-141" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('141', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-141-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-141" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('141', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-141-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: yo</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-140</link>
		<dc:creator>yo</dc:creator>
		<pubDate>Thu, 21 Aug 2008 14:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-140</guid>
		<description>yo,im also on godaddy
and i must say that error (sever has gone) when running longer sql queries really pissed me off.
though,the solution seems to be to mysql_close() the connection before it exceeds the time limit what actually probably causes godaddy service to close the connection itself.
but what i just recently noticed is,
check out Mysql Proccesslist on Godaddy MYSQL Servers,
you will see the port changes,that could be one reason why it says &quot;Server gone&quot;.
so each time you close the connection and estabilish a new one it catches the new port(which could have changed in an interval of max time).
So there are 2 theories:

1.Godaddy simply set a quite short maximum of connection time. : Workarround =&gt; mysql_close();
2.Godaddy changes port in an unknown interval(would need some research to find it out). : Workarround =&gt; mysql_close();

Maybe mysql_free_ressources also can help a bit,but i dont think so(just give it a try :)

so the final solution seems to be to close the godaddy mysql connection as fast as possible.

close,connect ... probably wont cause your server to crash(not really similiar to DOS) so no worries!</description>
		<content:encoded><![CDATA[<p>yo,im also on godaddy<br />
and i must say that error (sever has gone) when running longer sql queries really pissed me off.<br />
though,the solution seems to be to mysql_close() the connection before it exceeds the time limit what actually probably causes godaddy service to close the connection itself.<br />
but what i just recently noticed is,<br />
check out Mysql Proccesslist on Godaddy MYSQL Servers,<br />
you will see the port changes,that could be one reason why it says &#8220;Server gone&#8221;.<br />
so each time you close the connection and estabilish a new one it catches the new port(which could have changed in an interval of max time).<br />
So there are 2 theories:</p>
<p>1.Godaddy simply set a quite short maximum of connection time. : Workarround =&gt; mysql_close();<br />
2.Godaddy changes port in an unknown interval(would need some research to find it out). : Workarround =&gt; mysql_close();</p>
<p>Maybe mysql_free_ressources also can help a bit,but i dont think so(just give it a try <img src='http://terry.ipearson.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>so the final solution seems to be to close the godaddy mysql connection as fast as possible.</p>
<p>close,connect &#8230; probably wont cause your server to crash(not really similiar to DOS) so no worries!</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-140" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('140', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-140-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-140" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('140', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-140-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jim - 406NotAccceptable</title>
		<link>http://terry.ipearson.net/blogging/mysql-server-has-gone-away-problem-solved/comment-page-1/#comment-139</link>
		<dc:creator>Jim - 406NotAccceptable</dc:creator>
		<pubDate>Sun, 02 Mar 2008 01:14:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.terrypearson.com/2008/02/29/mysql-server-has-gone-away-problem-solved/#comment-139</guid>
		<description>At least you didn&#039;t have my mySQL problem (that sounds strange!) I had a silly plugin that got spammed and then decided to query all the spams, 50k rows at a time! :(

You can guess how my host reacted!</description>
		<content:encoded><![CDATA[<p>At least you didn&#8217;t have my mySQL problem (that sounds strange!) I had a silly plugin that got spammed and then decided to query all the spams, 50k rows at a time! <img src='http://terry.ipearson.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>You can guess how my host reacted!</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-139" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('139', 'add', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-139-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-139" src="http://terry.ipearson.net/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('139', 'subtract', 'terry.ipearson.net/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-139-down" style="font-size:12px; color:#990033;">1</span></p>]]></content:encoded>
	</item>
</channel>
</rss>
<!-- This Quick Cache file was built for (  terry.ipearson.net/2008/02/29/mysql-server-has-gone-away-problem-solved/feed/ ) in 0.94356 seconds, on Feb 9th, 2012 at 2:45 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 9th, 2012 at 5:32 am UTC -->
