|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
|I still would start by logging somewhere each time you say "new Socket()" and each time you say "socket.close()", to make sure those two numbers match...|
HItting a limit around 240 suggests you're running into some per-process limit: when I do "ulimit -n" on a terminal on MacOSX, it tells me I can only open 256 files at once. You could try doing a "ulimit -n 1024" on the shell that will start up your Java program (or the shell that starts up the browser that starts up...).
I think System.gc() is not guaranteed to actually trigger a garbage-collect cycle - but you could start a Java RMI server object within your application, just to get the RMI runtime initialized: it will force a garbage collect once a minute, once Java has published an RMI server object. This would allow you to see if your problem has to do with uncollected sockets... Or, from this page: http://stackoverflow.com/questions/1481178/forcing-garbage-collection-in-java - you might be able to do this:
On Jun 4, 2013, at 11:31 AM, Ben Spink <email@hidden> wrote:
_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
|>Re: Java7 Socket Closed Exception (From: Ben Spink <email@hidden>)|
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.