<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2FOpen_Files</id>
	<title>Linux/Open Files - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2FOpen_Files"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/Open_Files&amp;action=history"/>
	<updated>2026-06-17T19:05:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Linux/Open_Files&amp;diff=9933&amp;oldid=prev</id>
		<title>Kenneth: Created page with &quot;List processes with most open files:  lsof | awk &#039;{print $1}&#039; | sort | uniq -c | sort -rn | head -10  The &quot;Too many open files&quot; error occurs when a process or user reaches the upper limit of allocated file descriptors (FDs), which in Linux includes network sockets, pipes, and regular files. To resolve this, you need to identify the culprit process and then adjust either the user-level session limits or the system-wide limits.  Check session limits: Run ulimit -Sn to chec...&quot;</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/Open_Files&amp;diff=9933&amp;oldid=prev"/>
		<updated>2026-05-30T03:31:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;List processes with most open files:  lsof | awk &amp;#039;{print $1}&amp;#039; | sort | uniq -c | sort -rn | head -10  The &amp;quot;Too many open files&amp;quot; error occurs when a process or user reaches the upper limit of allocated file descriptors (FDs), which in Linux includes network sockets, pipes, and regular files. To resolve this, you need to identify the culprit process and then adjust either the user-level session limits or the system-wide limits.  Check session limits: Run ulimit -Sn to chec...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;List processes with most open files:&lt;br /&gt;
 lsof | awk &amp;#039;{print $1}&amp;#039; | sort | uniq -c | sort -rn | head -10&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Too many open files&amp;quot; error occurs when a process or user reaches the upper limit of allocated file descriptors (FDs), which in Linux includes network sockets, pipes, and regular files. To resolve this, you need to identify the culprit process and then adjust either the user-level session limits or the system-wide limits.&lt;br /&gt;
&lt;br /&gt;
Check session limits: Run ulimit -Sn to check your current soft limit and ulimit -Hn for your hard limit.&lt;br /&gt;
 ulimit -Sn&lt;br /&gt;
 ulimit -Hn&lt;br /&gt;
&lt;br /&gt;
Find the top offending processes: Run this command to see which applications have the highest number of open file descriptors:&lt;br /&gt;
 lsof | awk &amp;#039;{print $1}&amp;#039; | sort | uniq -c | sort -rn | head -10&lt;br /&gt;
&lt;br /&gt;
Count FDs for a specific PID: Use ls -la /proc/&amp;lt;PID&amp;gt;/fd | wc -l to see exactly how many files a single process has open&lt;br /&gt;
&lt;br /&gt;
Temporarily increase:&lt;br /&gt;
 ulimit -n 1000000&lt;br /&gt;
 # or&lt;br /&gt;
 sysctl -w fs.file-max=1000000&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>