<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title>Parallels knowledgebase (KB)</title>
<link>http://kb.parallels.com/</link>
<description>Parallels knowledgebase (KB)</description>
<language>en</language>
<copyright>Copyright 2008 Parallels</copyright>
<pubDate>Wed, 10 Sep 2008 00:00:00 +0600</pubDate>
<lastBuildDate>Wed, 10 Sep 2008 00:00:00 +0600</lastBuildDate>
<webMaster>rt-team@parallels.com</webMaster>

<item>
<title><![CDATA[How to recompile Apache,PHP and IMAP with increased value of file descriptors larger than FD_SETSIZE (1024) on Debian system?]]></title>
<link>http://kb.parallels.com/en/967</link>
<description><![CDATA[<div id="article">
	




	<div id="kb" class="kb">
		<div class="article-container">
			<h2 class="title">How to recompile Apache,PHP and IMAP with increased value of file descriptors larger than FD_SETSIZE (1024) on Debian system?</h2>
			<div class="ab-frame"><div class="bl"><div class="br"><div class="tl"><div class="tr"><!-- frame -->
				<div class="articleProperty">
					<div>Article ID: 967&nbsp;</div>
					<div>Last Review: Oct,6 2008</div>
					<tr>
						<td>Author: </td>
						<td></td>
					</tr>
					<br/>
					<tr>
						<td>Last updated by: </td>
						<td>system</td>
					</tr>
				</div><!-- articleProperty -->
			</div></div></div></div></div><!-- frame -->

			<div class="article-internal-flag"></div>

			<div id="article-content">
				<div class="article-part">
					<h2>Resolution</h2>
					<strong>NOTE: Since Plesk 8.2.0 up to 900 domains can be hosted on the OS vendor Apache build without&nbsp; system packages recompilation, described in this article, if Piped Logs feature is enabled on the Plesk server,&nbsp; see <a href="http://kb.parallels.com../en/2066" target="_blank">2066</a>.</strong><br /><br /><br />Add the following lines to <strong>/etc/sysctl.conf</strong>:<br /><br /><span style='font-family: courier new,courier;font-size: 12px;'>fs.file-max = 65536</span><br /><br />Run the following shell command:<br /><div class="commandline"><code>/sbin/sysctl -w fs.file-max=65536</code></div><br />Note that the value <strong>fs.file-max</strong> can be equal up to 2<sup>20</sup>=1048576).<br /><br />Add the following line to beginning of <strong>/etc/init.d/apache2</strong> and <strong>/usr/sbin/apache2ctl</strong>:<br /><br /><span style='font-family: courier new,courier;font-size: 12px;'>ulimit -n `cat /proc/sys/fs/file-max`</span><br /><br />Change <strong>__FD_SETSIZE</strong> value in <strong>/usr/include/bits/typesizes.h</strong> and <strong>/usr/include/nptl/bits/typesizes.h</strong> files. It should be like:<br /><br /><span style='font-family: courier new,courier;font-size: 12px;'>#define __FD_SETSIZE            65536</span><br /><br />Download and rebuild packages:<br /><div class="commandline"><code># apt-get install apt-src<br /># apt-src --build install openssl<br /># dpkg -i libssl*.deb openssl*.deb<br /># apt-src --build install apache2<br /># dpkg -i libapr*.deb apache2_*.deb apache2-common*.deb apache2-mpm-prefork*.deb apache2-utils*.deb<br /># cp /opt/psa/suexec/psa-suexec2 /usr/lib/apache2/suexec2 /etc/init.d/apache2 restart<br /># apt-src --build install libc-client2002edebian<br /># dpkg -i libc-client-dev_2002edebian1-*.deb libc-client2002edebian*.deb mlock*.deb<br /># apt-src --build install php4<br /># dpkg -i `ls *deb|grep php4|grep -v apache-mod`</code></div><br />How to prevent your rebuilt packages from overwriting during the system upgrade you can find in the article:<br /><br /><a href="http://kb.parallels.comhttp://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html#s-pin">http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html#s-pin</a>
				</div>
			</div>
		</div><!-- article-container -->


			<br/><br/>

			<div id="SubscriptionLink24Article" class="subscriptionLink2">
<a href="http://kb.parallels.com/subscriptions/index.html?Type=Article&ArticleID=967&ArticleLanguage=en&Product=&Category="><img src="http://kb.parallels.com/images/mail.png" width="15" height="15" alt="Subscription for changes to this article"></a>
<a href="http://kb.parallels.com/subscriptions/index.html?Type=Article&ArticleID=967&ArticleLanguage=en&Product=&Category=">Subscription for changes to this article</a>

<script type="text/javascript">

$(document).ready(function() {
	$('#SubscriptionLink24Article a').each(function(){
		$(this).click(function(event) {
			event.preventDefault();
			MainPageContentHide();
			$('#subscription').html('');
			$.get('/Stuff/Subscription', {
													'Type' : 'Article',
													'ArticleID' : '967',
													'ArticleLanguage' : 'en',
													'Product' : '',
													'Category' : ''
												}, function(data) {
																	$('#subscription').html(data);
																	$('#subscription').show();
																	SUBbuildsubmenus_product();
																});
		});
	});
});

</script>

</div>





	</div><!-- kb -->

</div><!-- article -->


]]></description>
<guid isPermaLink="false">617 LastUpdated: 2008-10-06 09:10:54</guid>
<pubDate>2008-10-06 09:10:54</pubDate>
</item>
</channel>
</rss>



