<?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: The Mystery of &quot;Too many open files&quot;</title>
	<atom:link href="http://www.rupeshk.org/blog/index.php/2007/02/the-mystery-of-too-many-open-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rupeshk.org/blog/index.php/2007/02/the-mystery-of-too-many-open-files/</link>
	<description>My Views on ColdFusion, Java and related technologies</description>
	<lastBuildDate>Tue, 07 Sep 2010 19:54:13 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brew</title>
		<link>http://www.rupeshk.org/blog/index.php/2007/02/the-mystery-of-too-many-open-files/comment-page-1/#comment-145</link>
		<dc:creator>Brew</dc:creator>
		<pubDate>Thu, 21 May 2009 09:29:32 +0000</pubDate>
		<guid isPermaLink="false">http://rupesh106.wordpress.com/2007/02/05/the-mystery-of-too-many-open-files/#comment-145</guid>
		<description>I had a similar problem in my own code. Alas mine was not a Sun Bug, this bit of code helped me track down where my code was misbehaving. It prints out all the files open by the current java process&lt;br /&gt;&lt;br /&gt; public static int pid() {&lt;br /&gt;        String id = ManagementFactory.getRuntimeMXBean().getName();&lt;br /&gt;        String[] ids = id.split(&quot;@&quot;);&lt;br /&gt;        return Integer.parseInt(ids[0]);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public static void listOpenFiles() throws IOException {&lt;br /&gt;        int pid = pid();&lt;br /&gt;        Runtime runtime = Runtime.getRuntime();&lt;br /&gt;        Process process = runtime.exec(&quot;lsof -p &quot; + pid);&lt;br /&gt;        InputStream is = process.getInputStream();&lt;br /&gt;        InputStreamReader isr = new InputStreamReader(is);&lt;br /&gt;        BufferedReader br = new BufferedReader(isr);&lt;br /&gt;        String line;&lt;br /&gt;&lt;br /&gt;        while ((line = br.readLine()) != null) {&lt;br /&gt;            log.info(line);&lt;br /&gt;        }&lt;br /&gt;    }</description>
		<content:encoded><![CDATA[<p>I had a similar problem in my own code. Alas mine was not a Sun Bug, this bit of code helped me track down where my code was misbehaving. It prints out all the files open by the current java process</p>
<p> public static int pid() {<br />        String id = ManagementFactory.getRuntimeMXBean().getName();<br />        String[] ids = id.split(&#8221;@&#8221;);<br />        return Integer.parseInt(ids[0]);<br />    }</p>
<p>    public static void listOpenFiles() throws IOException {<br />        int pid = pid();<br />        Runtime runtime = Runtime.getRuntime();<br />        Process process = runtime.exec(&#8221;lsof -p &#8221; + pid);<br />        InputStream is = process.getInputStream();<br />        InputStreamReader isr = new InputStreamReader(is);<br />        BufferedReader br = new BufferedReader(isr);<br />        String line;</p>
<p>        while ((line = br.readLine()) != null) {<br />            log.info(line);<br />        }<br />    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: José Manuel</title>
		<link>http://www.rupeshk.org/blog/index.php/2007/02/the-mystery-of-too-many-open-files/comment-page-1/#comment-141</link>
		<dc:creator>José Manuel</dc:creator>
		<pubDate>Tue, 10 Mar 2009 22:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://rupesh106.wordpress.com/2007/02/05/the-mystery-of-too-many-open-files/#comment-141</guid>
		<description>Hi&lt;br/&gt;&lt;br/&gt;I have this problem, and I tryed to solve it by removing the classpath from the MANIFEST in the external jars (third party jars), but when I packed again the jar file, it does not work.  Any sugest? Thanks a lot</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I have this problem, and I tryed to solve it by removing the classpath from the MANIFEST in the external jars (third party jars), but when I packed again the jar file, it does not work.  Any sugest? Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wagner</title>
		<link>http://www.rupeshk.org/blog/index.php/2007/02/the-mystery-of-too-many-open-files/comment-page-1/#comment-140</link>
		<dc:creator>Wagner</dc:creator>
		<pubDate>Fri, 13 Feb 2009 21:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://rupesh106.wordpress.com/2007/02/05/the-mystery-of-too-many-open-files/#comment-140</guid>
		<description>Great!Great!Great Discovery.&lt;br/&gt;&lt;br/&gt;But, I still did not understand a thing: when I startup the Jboss Aplication Service this kind of problemns don&#039;t arrive, but when I startup Geronimo Aplication Services the problems arrive. &lt;br/&gt;&lt;br/&gt;I am wandering if all of folks that use Geronimo runs in this problem and if all of them visit the manifest of all jar to solve the problem?&lt;br/&gt;&lt;br/&gt;Best regards!</description>
		<content:encoded><![CDATA[<p>Great!Great!Great Discovery.</p>
<p>But, I still did not understand a thing: when I startup the Jboss Aplication Service this kind of problemns don&#8217;t arrive, but when I startup Geronimo Aplication Services the problems arrive. </p>
<p>I am wandering if all of folks that use Geronimo runs in this problem and if all of them visit the manifest of all jar to solve the problem?</p>
<p>Best regards!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Call me Mimi</title>
		<link>http://www.rupeshk.org/blog/index.php/2007/02/the-mystery-of-too-many-open-files/comment-page-1/#comment-139</link>
		<dc:creator>Call me Mimi</dc:creator>
		<pubDate>Fri, 02 May 2008 03:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://rupesh106.wordpress.com/2007/02/05/the-mystery-of-too-many-open-files/#comment-139</guid>
		<description>Hi Rupesh. Thanks for posting the blog entry. I&#039;m having the same problem. First I suspected if there is any code which don&#039;t close the file. But, I can&#039;t find one.&lt;br/&gt;&lt;br/&gt;But, how can I find which jar has the wrong classpath in the manifest? I use several 3rd party jar. Some of them are: spring, struts2, velocity, activation.jar, quartz, hibernate, and some common libraries from Apache. On your case, which jar caused the problem?</description>
		<content:encoded><![CDATA[<p>Hi Rupesh. Thanks for posting the blog entry. I&#8217;m having the same problem. First I suspected if there is any code which don&#8217;t close the file. But, I can&#8217;t find one.</p>
<p>But, how can I find which jar has the wrong classpath in the manifest? I use several 3rd party jar. Some of them are: spring, struts2, velocity, activation.jar, quartz, hibernate, and some common libraries from Apache. On your case, which jar caused the problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemant</title>
		<link>http://www.rupeshk.org/blog/index.php/2007/02/the-mystery-of-too-many-open-files/comment-page-1/#comment-138</link>
		<dc:creator>Hemant</dc:creator>
		<pubDate>Wed, 07 Feb 2007 09:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://rupesh106.wordpress.com/2007/02/05/the-mystery-of-too-many-open-files/#comment-138</guid>
		<description>This was a nice catch Sanjeev/Rupesh.&lt;br /&gt;&lt;br /&gt;Hemant</description>
		<content:encoded><![CDATA[<p>This was a nice catch Sanjeev/Rupesh.</p>
<p>Hemant</p>
]]></content:encoded>
	</item>
</channel>
</rss>
