Wednesday, May 13, 2009

too many open files

weblogic.socket.SocketOptionException: Too many open files
weblogic.socket.SocketOptionException: Too many open files
at weblogic.socket.SocketMuxer.initSocket(SocketMuxer.java:431)
at weblogic.socket.SocketMuxer.newSocket(SocketMuxer.java:310)
at weblogic.socket.ChannelSocketFactory.createSocket(ChannelSocketFactory.java:82)
at weblogic.socket.ChannelSocketFactory.createSocket(ChannelSocketFactory.java:58)
at weblogic.net.http.HttpClient.openServer(HttpClient.java:355)
at weblogic.net.http.HttpClient.openServer(HttpClient.java:434)
at weblogic.net.http.HttpClient.(HttpClient.java:159)
at weblogic.net.http.HttpClient.(HttpClient.java:149)
at weblogic.net.http.HttpURLConnection.getHttpClient(HttpURLConnection.java:190)
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:414)
at weblogic.rjvm.http.HTTPClientJVMConnection.receiveAndDispatch(HTTPClientJVMConnection.java:404)
at weblogic.rjvm.http.HTTPClientJVMConnection.run(HTTPClientJVMConnection.java:295)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)



start by logging with the same user which runs weblogic, and do
ulimit -a

you should see for sockets a limit of 1024

you can change it by

ulimit -n 2048

if you do lsof you can get an idea of who is eating those resources.
bear in mind that file handles and sockets are considered as same.


You can also:
su - (you become root)
vi /etc/security/limits.conf

insert:
* soft nofile 2048
* hard nofile 2048


and do:
sysctl -p
to reload the configuration

No comments: