<?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>UNIXy &#187; Break-Fix</title>
	<atom:link href="http://blog.unixy.net/category/break-fix/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.unixy.net</link>
	<description>Truly Fully Managed Servers</description>
	<lastBuildDate>Thu, 29 Jul 2010 13:13:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Quick &amp; dirty Varnish monitoring script</title>
		<link>http://blog.unixy.net/2010/05/dirty-varnish-monitoring-script/</link>
		<comments>http://blog.unixy.net/2010/05/dirty-varnish-monitoring-script/#comments</comments>
		<pubDate>Thu, 27 May 2010 04:56:25 +0000</pubDate>
		<dc:creator>UNIXy</dc:creator>
				<category><![CDATA[Break-Fix]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[restart]]></category>
		<category><![CDATA[varnish]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=311</guid>
		<description><![CDATA[Depending on which version of Varnish you have running, there is a chance the code is still experimental and the whole Varnish daemon is prone to a fatal crash. Here is a quick and dirty monitoring script for Varnish. It essentially runs as a crontab job and requests a PING response. Should it not receive [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F05%2Fdirty-varnish-monitoring-script%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F05%2Fdirty-varnish-monitoring-script%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Depending on which version of Varnish you have running, there is a chance the code is still experimental and the whole Varnish daemon is prone to a fatal crash.</p>
<p>Here is a quick and dirty monitoring script for Varnish. It essentially runs as a crontab job and requests a PING response. Should it not receive a PONG from Varnish, it will attempt a restart. There is a second round of testing within the same script. This is a second level of PING request; just in case. Be sure to set the usual defaults like -T port and varnish runlevel script.</p>
<blockquote><p><code>#!/bin/bash</code></p>
<p><code>result=$(echo -e "ping\n\r" | nc localhost 6082|grep PONG|wc -l);</code></p>
<p><code>if [ "${result}" -lt "1" ];<br />
then<br />
/etc/init.d/varnish stop;<br />
sleep 5;<br />
/etc/init.d/varnish start;<br />
echo "$(hostname): Varnish restart" | mail -s "$(hostname): Restarting varnish" alerts@example.com;<br />
fi</code></p>
<p><code>sleep 5;</code></p>
<p><code>results=$(echo -e "ping\n\r" | nc localhost 6082|grep PONG|wc -l);</code></p>
<p><code>if [ "${results}" -lt "1" ];<br />
then<br />
/etc/init.d/varnish stop;<br />
sleep 5;<br />
/etc/init.d/varnish start;<br />
echo "$(hostname): Second Varnish restart" | mail -s "$(hostname): Restarting varnish second time" alerts@example.com;<br />
fi</code></p>
<p><code> </code></p>
<p><code>exit 0;</code></p></blockquote>
<p>Finally load the job into crontab:</p>
<blockquote><p><code>*/5 * * * * /root/varnish.sh</code></p></blockquote>
<p>A cleaner way of accomplishing the same goal would be to establish a permanent connection to the Varnish admin port (6082 in this case) and issue a PING command every other second or so. The interval can be in the sub seconds as opposed to minutes as is the case with crontab.</p>
<p>Here is an example:</p>
<blockquote><p><code># telnet localhost 6082<br />
Trying 127.0.0.1...<br />
Connected to localhost.<br />
Escape character is '^]'.<br />
ping<br />
200 19<br />
PONG 1274931430 1.0<br />
ping<br />
200 19<br />
PONG 1274931434 1.0<br />
ping<br />
200 19<br />
PONG 1274931437 1.0<br />
ping<br />
200 19<br />
PONG 1274931443 1.0</code></p></blockquote>
<p>We deploy Varnish and other tools on our clients&#8217; server to get the most performance out of hardware. Our clients are happy with the performance boost and we are happy of the end result. Please do <a title="UNIXY's Portal" href="https://www.unixy.net/" target="_blank">get in touch</a> if you have any question or comment</p>
<p>That&#8217;s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2010/05/dirty-varnish-monitoring-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[ERROR] /usr/sbin/mysqld: Out of memory (Needed bytes)</title>
		<link>http://blog.unixy.net/2010/03/error-usrsbinmysqld-out-of-memory-needed-bytes/</link>
		<comments>http://blog.unixy.net/2010/03/error-usrsbinmysqld-out-of-memory-needed-bytes/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 15:00:53 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Break-Fix]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqld]]></category>
		<category><![CDATA[out of memory]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=275</guid>
		<description><![CDATA[Howdy! The above error can come up quite often on a busy database-driven website or it could happen at one time or the other for different reasons. Today, we are going to cover the main two reasons for it happening. I shall break this down by architecture. Linux x86_64 (64-bit) The Out of memory error [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F03%2Ferror-usrsbinmysqld-out-of-memory-needed-bytes%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F03%2Ferror-usrsbinmysqld-out-of-memory-needed-bytes%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Howdy!</p>
<p>The above error can come up quite often on a busy database-driven website or it could happen at one time or the other for different reasons. Today, we are going to cover the main two reasons for it happening. I shall break this down by architecture. </p>
<p><strong>
<li>Linux x86_64 (64-bit)</li>
<p></strong></p>
<p>The <em>Out of memory</em> error indicates that the whole system has run out of memory at that point in time. For example, I happened to be loading a customer&#8217;s database that required more than 4GB of free RAM on the system. The system had 2GB of free RAM to work with so the MySQL process failed to import the database due to a lack of memory. The solution here is to add more memory into the system.</p>
<p><strong>
<li>Linux i386 (32-bit)</li>
<p></strong></p>
<p>Here, the error indicates that either the system ran out of memory, just like in x86_64 above, or that the process cannot address more memory even if it is available. This is more peculiar to the architecture than it is a shortcoming of MySQL. 32-bit operating systems are not capable of letting a process address more than roughly 4GB of memory. The best approach here is to install a 64-bit OS that is capable of addressing that much RAM.</p>
<p>Keep in mind that UNIXy fully manages its customers&#8217; servers. Should this particular problem occur while assisting a customer, we are always more than happy to provide a complimentary memory upgrade to complete the task.</p>
<p>That&#8217;s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2010/03/error-usrsbinmysqld-out-of-memory-needed-bytes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improve phpBB Performance &#8211; Quick Win</title>
		<link>http://blog.unixy.net/2010/03/improve-phpbb-performance-quick-win/</link>
		<comments>http://blog.unixy.net/2010/03/improve-phpbb-performance-quick-win/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 05:12:54 +0000</pubDate>
		<dc:creator>UNIXy</dc:creator>
				<category><![CDATA[Break-Fix]]></category>
		<category><![CDATA[boardindex]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[phpBB]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[slow]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=266</guid>
		<description><![CDATA[phpBB is a open source forum software. The board&#8217;s index page lists the topics along with a listing of online members. While trouble shooting a customer report of a slower loading of the board &#8220;index&#8221; page, we found out that the fix in itself is simple and easy to implement. We would like to share [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F03%2Fimprove-phpbb-performance-quick-win%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F03%2Fimprove-phpbb-performance-quick-win%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>phpBB is a open source forum software. The board&#8217;s index page lists the topics along with a listing of online members. While trouble shooting a customer report of a slower loading of the board &#8220;index&#8221; page, we found out that the fix in itself is simple and easy to implement. We would like to share this solution in the hope that it will benefit others. It turns out one of the hot spot table, phpbb_users, is not indexed. The performance fix is to simply add an index on column user_email of only 15 characters. Here is an example of the index creation:</p>
<blockquote><p><code>create index phpbb_users_email on phpbb_users (user_email(15));</code></p></blockquote>
<p>That should do it. Enjoy the quick performance bump! Keep in mind that UNIXy is a fully managed shop and is always happy to lend a hand with systems questions. This is part of our fully managed services guarantee that comes with our VPS and dedicated servers.</p>
<p>That&#8217;s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2010/03/improve-phpbb-performance-quick-win/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Note that the MySQL client library is not bundled anymore. Solved!</title>
		<link>http://blog.unixy.net/2010/01/note-that-the-mysql-client-library-is-not-bundled-anymore-solved/</link>
		<comments>http://blog.unixy.net/2010/01/note-that-the-mysql-client-library-is-not-bundled-anymore-solved/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 03:09:14 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Break-Fix]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[lib64]]></category>
		<category><![CDATA[lightspeed]]></category>
		<category><![CDATA[litespeed]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=232</guid>
		<description><![CDATA[This error is not specific to Litespeed but can be encountered while building PHP with MySQL support on 64-bit systems. The fix is to tell the build that the MySQL client is indeed installed, but in a different directory, by adding the following flag to the configure line in Litespeed: --with-libdir=lib64 The reason being the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F01%2Fnote-that-the-mysql-client-library-is-not-bundled-anymore-solved%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F01%2Fnote-that-the-mysql-client-library-is-not-bundled-anymore-solved%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>This error is not specific to Litespeed but can be encountered while building PHP with MySQL support on 64-bit systems. The fix is to tell the build that the MySQL client is indeed installed, but in a different directory, by adding the following flag to the configure line in Litespeed:</p>
<blockquote><p><code>--with-libdir=lib64</code></p></blockquote>
<p>The reason being the build doesn&#8217;t know at this point that it is dealing with a 64-bit OS. If adding the above switch does not work, be sure to install the MySQL client and libraries.</p>
<p>That&#8217;s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2010/01/note-that-the-mysql-client-library-is-not-bundled-anymore-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSL Errors With Apache</title>
		<link>http://blog.unixy.net/2009/10/ssl-errors-with-apache/</link>
		<comments>http://blog.unixy.net/2009/10/ssl-errors-with-apache/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 06:00:47 +0000</pubDate>
		<dc:creator>UNIXy</dc:creator>
				<category><![CDATA[Break-Fix]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache SSL error]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[rebuildhttpconf]]></category>
		<category><![CDATA[received a record]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=58</guid>
		<description><![CDATA[If you receive one of the following errors, it&#8217;s very possible the Apache process is listening on port 443 but is not responding using the SSL protocol routines. In brief it is a protocol mismatch. Here&#8217;s a list of possible errors: Firefox error: SSL received a record that exceeded the maximum permissible length Apache error [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2009%2F10%2Fssl-errors-with-apache%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2009%2F10%2Fssl-errors-with-apache%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>If you receive one of the following errors, it&#8217;s very possible the Apache process is listening on port 443 but is not responding using the SSL protocol routines. In brief it is a protocol mismatch. Here&#8217;s a list of possible errors:</p>
<p><strong>Firefox error</strong>: <code>SSL received a record that exceeded the maximum permissible length</code></p>
<p><strong>Apache error log</strong>: <code>\x80d\x01\x03\x01</code></p>
<p><strong>Curl CLI error</strong>: <code>curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol </code></p>
<p>The fastest way to recover from such error is to restore the most recent Apache configuration file from backup. If you do not have a backup copy, you will need to look at your virtualhost section associated with the domain and SSL port combination. Chances are it does not exist. In cPanel, this issue can be corrected with a simple run of the script rebuildhttpdconf as such:</p>
<p><code>/scripts/rebuildhttpdconf</code></p>
<p>After making the necessary changes, and whether you are running cPanel or not, you will need to stop Apache then restart it.</p>
<p>That&#8217;s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2009/10/ssl-errors-with-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
