Troubleshooting “Too many open files” Errors in Weblogic(The examples in this document will specifically deal with Weblogic 8.1 running on Solaris) A process uses a file descriptor both for opening a network socket and opening a file, so when we receive the “Too many open files” error it could be a problem related to either of these. The first thing to check is how many file descriptors you are currently allowing for the Weblogic process. Running the ulimit command will tell you what your default file descriptor limits are set to:
$ ulimit -aHThe –H option will tell you the hard limit of the system which is 1024 in this example. This tells us the maximum amount of file descriptors that can be opened by a single process. To change this setting you will need to be root and make a kernel parameter change which will require reboot. But also keep in mind that this is a system limit default so there’s no guarantee that your Weblogic process is using that same setting. It can’t use more file descriptors than the system will allow but it could use less. So we need to verify the current file descriptor limit for the specific Weblogic process by running plimit {pid}:
$ plimit 23334Here we see the same set of data only for the specific process. So this verifies that our Weblogic process is set properly to use 1024 as it’s maximum. If this was set lower, like 256 or 512, then we might have found the solution. We would merely increase the amount of file descriptors for the process up to a maximum of 1024. To do this we can specify ulimit –n 1024 (or whatever the new value is) in either the Weblogic startup script or the user profile depending how you have it setup. Once you make the changes and restart Weblogic, verify the new limit with the plimit command again. |