Questions tagged [max-file-descriptors]

30 questions
84
votes
5 answers

Practical maximum open file descriptors (ulimit -n) for a high volume system

We recently began load testing our application and noticed that it ran out of file descriptors after about 24 hours. We are running RHEL 5 on a Dell 1955: CPU: 2 x Dual Core 2.66GHz 4MB 5150 / 1333FSB RAM: 8GB RAM HDD: 2 x 160GB 2.5" SATA Hard…
Kevin
  • 943
  • 1
  • 7
  • 5
18
votes
1 answer

Ubuntu 16.04 Server MySql open_file_limit won't go higher than 65536

I'm running Ubuntu 16.04 Server on XenServer and I'm running into an issue with MySql's open file limit. Here's what I've done so far: sudo nano /etc/security/limits.conf (reference) * soft nofile 1024000 * hard nofile 1024000 * soft nproc 102400 *…
J Pierret
  • 181
  • 1
  • 1
  • 6
16
votes
6 answers

Why (or how) does the number of open file descriptors in use by root exceed ulimit -n?

Our server recently ran out of file descriptors, and in regards to that I have some questions. ulimit -n is supposed to give me the maximum number of open file descriptors. That number is 1024. I checked the number of open file descriptors by…
oligofren
  • 641
  • 2
  • 8
  • 23
15
votes
4 answers

How can lsof report a higher number of open files than what ulimit says should be allowed?

How can lsof report more open files than what ulimit says is the limit? prod_web3(i-ca0b05aa):~$ sudo lsof | wc -l 4399 prod_web3(i-ca0b05aa):~$ ulimit -n 1024
Adam Nelson
  • 1,647
  • 3
  • 14
  • 12
13
votes
3 answers

How to track down a file descriptor leak?

I have a java process (Glassfish) which is leaking file descriptors. I know this because I get the helpful java.io.IOException: Too many open files exception. I can look in /proc/PID#/fd and see all the open file descriptors. When I use lsof I…
cclark
  • 567
  • 2
  • 6
  • 14
10
votes
1 answer

Default value of /proc/sys/fs/file-max

I am aware that /proc/sys/fs/file-max defines the maximum number of open file descriptors and can be set on runtime or during boot. However: what is its default value? Checking 10 servers in my company gives me 7 different values, which all seem…
taranion
  • 235
  • 3
  • 7
10
votes
3 answers

Is there a maximum of open files per process in Linux?

My question is pretty simple and is actually stated in the title. One of my applications throws errors regarding "too many open files" at me, even tho the limit for the user the application runs with is higher than the default of 1024 (lsof -u $USER…
Malax
  • 223
  • 1
  • 2
  • 5
8
votes
2 answers

How to configure linux file descriptor limit with fs.file-max and ulimit

Server applications running on linux often require large quantities of open file handlers, for ex. HBase ulimit, Hadoop epoll limit This wiki entry should serve as documentary for Linux file limits configuration. What is soft vs. hard limit? How…
Maxim Veksler
  • 2,725
  • 10
  • 28
  • 32
6
votes
2 answers

mkdir: "no space left on device" on specific folders after Apache Tomcat reached max-file ulimit

The question: I have a tomcat running a java application that occasionally accumulates socket handles and reaches the ulimit we configured (both soft and hard) for max-open-files, which is 100K. When this happens, the java appears to still be alive,…
5
votes
1 answer

How do you force a process to flush the data written to an open file descriptor under Linux?

I have a binary process (with no sources available) running on an embedded Linux system. The process opens a log file (/tmp/dmaosd.log) where it logs what it's doing. The problem is the log gets updated in chunks (about 1000 bytes at a time), so I…
Mad_Ady
  • 475
  • 1
  • 6
  • 14
5
votes
4 answers

How to increase max FD limit for a daemon process running under a headless user?

To increase the FD limit for a daemon process running under a headless user on a Ubuntu Linux machine we did following changes in /etc/security/limits.conf soft nofile 10000 hard nofile 10000 We also added session required pam_limits.so in…
Ameliorator
  • 181
  • 2
  • 6
5
votes
3 answers

Squid running out of file descriptors on Ubuntu

I am running Squid 2.7 on Ubuntu 10.04 64bits. I had the problem of Squid running out of file descriptors, with the following error showing in /var/log/squid/cache.log: WARNING! Your cache is running out of filedescriptors I checked…
UrkoM
  • 383
  • 4
  • 17
4
votes
1 answer

Strace Apache process output showing 24 seconds wait?What can be the reason?

Performed strace on one one of the apache children and its showing 24 seconds between two system calls.How can i determine what is the cause of this behavior.It looks like both children are taking almost same amound of time(24.7 and 23.92)…
ananthan
  • 1,510
  • 1
  • 18
  • 28
4
votes
1 answer

How does RHEL 5 (Linux kernel 2.6.18) determine the default fs.file-max setting?

If fs.file-max is not set in /etc/sysctl.conf on RHEL 5 or its derivatives, how does the kernel determine the default value? Is there a formula used to set the fs.file-max value based on the amount of system RAM? I checked a number of random RHEL…
aaltonen
  • 81
  • 1
  • 5
3
votes
2 answers

How to calculate ulimit -n (file descriptors) for a dedicated squid server

I have a production squid server that was having some issues serving content and reporting that it was out of file descriptors. I was successfully able to increase it from 1024 (default) to 4096 and it seemed to resolve my errors in the log. I was…
TheGrandPackard
  • 206
  • 1
  • 10
1
2