<?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>devote.your.life &#187; Flash Streaming</title>
	<atom:link href="http://www.auricom.com/devote/category/flashstreaming/feed" rel="self" type="application/rss+xml" />
	<link>http://www.auricom.com/devote</link>
	<description>A developers journal by Ian McLean</description>
	<lastBuildDate>Thu, 17 Dec 2009 21:59:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Red5 on a VPS?</title>
		<link>http://www.auricom.com/devote/red5-on-a-vps</link>
		<comments>http://www.auricom.com/devote/red5-on-a-vps#comments</comments>
		<pubDate>Wed, 31 Jan 2007 21:51:09 +0000</pubDate>
		<dc:creator>ian</dc:creator>
				<category><![CDATA[Flash Streaming]]></category>

		<guid isPermaLink="false">http://auricom.com/devote/?p=4</guid>
		<description><![CDATA[Well today I thought I would sit down and try and get Red5 0.6rc to install on my mediatemple VPS account so that I might abuse the terrabyte of bandwidth I have at my disposal. Might I mention that I&#8217;ve spent quite a bit of time trying to get FMS2.0.3 to install on this VPS [...]]]></description>
			<content:encoded><![CDATA[<p>Well today I thought I would sit down and try and get Red5 0.6rc to install on my mediatemple VPS account so that I might abuse the terrabyte of bandwidth I have at my disposal.</p>
<p>Might I mention that I&#8217;ve spent quite a bit of time trying to get FMS2.0.3 to install on this VPS and that my final assessment of the situation is that FMS just doesn&#8217;t like VPS accounts (or at least ones powered by Virtuosso). In /var/messages it reports that the server process cannot create a mutex. Considering a mutex (from what I understand) is a universal shared object that can only be access by a single thread at a time, then I can only assume that the VPS restricts the creation of mutexes at the system level &#8211; thus being the problem. On a side note, if anyone has managed to get FMS2 to run under a VPS or has gotten by this problem I would be very interested.</p>
<p>Getting back on track: Red5 VPS installation. After installing Apache Ant and JDK1.5 I attempting to compile Red5 but encountered the following error:</p>
<p><code><br />
Error occurred during initialization of VM<br />
Could not reserve enough space for object heap<br />
Could not create the Java virtual machine.<br />
</code></p>
<p>I did a bit of research and learned that the java VM uses the max system memory as a way to build the heap. It turned out that you can use the following flags to limit the memory usage of the VM</p>
<p><code>java -Xms48m -Xmx96</code></p>
<p>48m and 96m are the min and max memory the VM is allowed to use. In order to get ant to use these flags when building the Red5 source you have to export the following:</p>
<p><code><br />
export ANT_OPTS='-Xms48m -Xmx64m'<br />
</code></p>
<p>So if you were setting up your paths in your bash profile it would all look something like this:</p>
<p><code><br />
# .bash_profile# Get the aliases and functions</code></p>
<p>if [ -f ~/.bashrc ]; then<br />
. ~/.bashrc<br />
fi</p>
<p># User specific environment and startup programs<br />
PATH=$PATH:$HOME/bin<br />
BASH_ENV=$HOME/.bashrc<br />
USERNAME=&#8221;root&#8221;<br />
export USERNAME BASH_ENV PATH<br />
export ANT_HOME=/usr/local/ant<br />
export JAVA_HOME=/usr/local/java/jdk1.5.0<br />
export PATH=${PATH}:${ANT_HOME}/bin<br />
export ANT_OPTS=&#8217;-Xms48m -Xmx64m&#8217;<br />
After making these changes I was able to run ant, but it seems that my VPS, having only 75mb of free memory, couldn&#8217;t handle the compile. &#8216;ant -verbose server&#8217; generated the following error:</p>
<p><code><br />
[javac] Error occurred during initialization of VM<br />
[javac] Could not create the Java virtual machine.<br />
[javac] Could not reserve enough space for object heap BUILD FAILED<br />
</code></p>
<p>This looks like the same memory alocation issue that we had already, but this time with javac.</p>
<p>This is where I&#8217;ve had to stop. I&#8217;m not quite sure yet how to restrict memory usage for javac within the compile process &#8211; if anyone has any thoughts or ideas I&#8217;d like to hear them.</p>
<p>Ideally I&#8217;d like to turn my efforts into a tutorial for Red5 users who want to utilize a VPS. We&#8217;ll see where it goes from here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.auricom.com/devote/red5-on-a-vps/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
