0

I have an application running on Linux Server. But server suddenly stopped responding but when I ping from other machine to server it allowed to ping but was not allowing to login into the server. Not sure why?

Scenario:

  • Application and server both were running fine.
  • At particular time, it seems it was not responding as we were not able to login into the server but we were able to ping the server from other machine.
  • As it was not allowing us to login into the server, we re-booted the server and then we were able to login.

Now the problem is, we are not sure why this happened. We tried to look into /var/log/messages file and found below suspicious message:

kernel: VFS: file-max limit 100000 reached

Could anyone please help us on, how we can check what/which processes took these many descriptors? Is there any log files where we can find which process has taken so many descriptors open ?

Please let me know if any further information required on this.

Thanks

1
  • 1
    Check this question for a script that show open files per process id.
    – fvu
    Aug 25, 2015 at 15:08

1 Answer 1

3

The message indicates that the machine running out of file handles, check the current value and try increasing the value.

List the current max-limit
#cat  /proc/sys/fs/file-max

To increase the number of files (for whole system), add the following line to your sysctl.conf (/etc/sysctl.conf)

fs.file-max = 131072

Run below command to re-read the configuration file

sysctl -p 

The value in file-max denotes the maximum number of file-handles that the Linux kernel will allocate. When you get lots of error messages about running out of file handles, you might want to increase this limit. Attempts to allocate more file descriptors than file-max are reported with error, "VFS: file-max limit reached.

I don't think there is log where we have information on which process have opened max file-descriptors

2
  • 3
    You really shouldn't increase that value unless you have investigated to be certain that having a large number of files is not a problem. You can see open file descriptors with the lsof command.
    – Zoredache
    Aug 25, 2015 at 17:43
  • Yes. lsof command would be useful to check open FD. But the error which is coming on my server is not frequent and not easy to reproduce. So as I said I hard rebooted the server. So is there any log file from which we can say that because of X process server got jammed/hanged ?
    – Jigish
    Aug 26, 2015 at 18:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .