There is a profiler available for the jdk which spits out a nice overview of
all the instances of classes that are used.. Maby that can help you check
the correctnes of the code and see the bottlenecks (it also says how much
memory it uses..).. Just saw a report on that one day, so you have to check
java.sun.com for more details..

Mvgr,
martin

> -----Original Message-----
> From: Ivan Markovic [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 17, 2001 5:39 AM
> To: [EMAIL PROTECTED]
> Subject: How can I find number of 'open files'
> Importance: High
>
>
> I had a problem a while back with 'too many open files'. So I checked
> and fix some bugs in my code and increased the limit (Solaris running
> on Sun Netra T1).  But now the problem is back. I suspect it is a
> problem with my code.
>
> How can I find out how many files are 'open'? If I can track that
> number then I can hit my code through Tomcat and see roughly when the
> files are not being closed. Is there some Unix function that will
> allow me to monitor open files?
>
> Below is the kind of error that I see.... thank you.
>
> java.net.SocketException: Too many open files
>          at java.net.PlainSocketImpl.socketAccept(Native Method)
>          at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:421)
>          at java.net.ServerSocket.implAccept(ServerSocket.java:243)
>          at java.net.ServerSocket.accept(ServerSocket.java:222)
>          at
> org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket(PoolTcpEndp
> oint.java:277)
>          at
> org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:344)
>          at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
>          at java.lang.Thread.run(Thread.java:484)
> Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8007]
> shutdown due to exception: java.net.SocketException: Too many open
> files
>
> --
> Ivan Markovic
> SculptLight
> http://www.sculptlight.com
> (+353) 87 2939256
> (+353) 1 2982205
>
> 114 Lower Churchtown Rd,
> Dublin 14,
> Ireland.
>

Reply via email to