- java.io.FileNotFoundException
Too many open files in system
The above exception is caused by:
- Too many open files in system
[2013-06-27T15:40:03.611-07:00] [CRMCommonServer_1] [ERROR] [] [oracle.security.audit.ajl.loader.AuditLoaderManager] [tid: AuditLoaderRunner] [ecid: 0000Jy7mm0L7y0I_IpG7yf1Hn9FC0001na,0] IAU:IAU-5046: Stopping AuditLoader, caught exception: oracle.security.audit.AuditException: java.io.FileNotFoundException: /slot/.../MyDomain/servers/myserver_1/logs/iau/state/auditloader.state (Too many open files in system)[[
at oracle.security.audit.service.AuditLoaderManager.readMessages(AuditLoaderManager.java:276)
at oracle.security.audit.service.AuditLoaderManager$Runner.run(AuditLoaderManager.java:335)
Caused by: java.io.FileNotFoundException: /slot/.../MyDomain/servers/MyServer_1/logs/iau/state/auditloader.state (Too many open files in system)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.
at java.io.FileOutputStream.
at java.io.FileWriter.
at oracle.security.audit.ajl.loader.AuditLoader.saveState(AuditLoader.java:213)
at oracle.security.audit.service.AuditLoaderManager.readMessages(AuditLoaderManager.java:262)
... 1 more
User Level File Descriptor Limits
To view current open file limit for the current Linux user, run command:
$ulimit -n
8192
$ ulimit -n 16384
- Exit all shell sessions for the user you want to change limits on.
- As root, edit the file /etc/security/limits.conf and add these two lines toward the end:
- user1 soft nofile 16384
user1 hard nofile 16384
- Save the file.
- Login as the user1 again. The new changes will be in effect.
System-wide File Descriptors Limits
On Linux, there is also a system-wide configuration parameter named:
- fs.file_max
$cat /proc/sys/fs/file-max
100000
Many application such as Oracle database or WebLogic server needs this setting quite higher. So you can increase the maximum number of open files by setting a new value in kernel variable /proc/sys/fs/file-max as follows (login as the root):
# sysctl -w fs.file-max=262144
Above command forces the limit to 262144 files. You need to edit /etc/sysctl.conf file and put following line so that after reboot the setting will remain as it is:
# vi /etc/sysctl.conf
Append a configuration directive as follows:
fs.file-max = 262144
Save and close the file. Users need to log out and log back in again to changes take effect or just type the following command:
# sysctl -p
Verify your settings with command:
# cat /proc/sys/fs/file-max
OR
# sysctl fs.file-max
# sysctl fs.file-max
Final Words
Note that commands used in this article are good for the following Linux release:
$ cat /etc/*-release
Enterprise Linux Enterprise Linux Server release 5.8 (Carthage)
Oracle Linux Server release 5.8
1 comment:
www 53 com activate
Post a Comment