Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Java7 Socket Closed Exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java7 Socket Closed Exception

On a hunch, I also tried this same scenario in Java 6 by launching the jar directly and not using a JNLP file.  Same machine, same files, same config...etc.  So far no issues.

I am using jxfilewatcher as part of this.  It opens file handles to all the file's its watching.  Roughly 4300 items in the folder I am working with.  With the 10240 limit in OS X, that shouldn't pose a problem for java being able to make sockets...right?

We upped the limit with sysctl to 100,000 with no effect on the situation either.


>> To get the obvious questions out of the way first...
>> Are you closing your sockets when you're done with them?  Waiting/Hoping for garbage collection to reclaim your sockets for you is a bad idea...  (Symptoms would look just like what you're experiencing...).
>> Moises
> An lsof indicated this might be the issue...
> I have about 240+ of these lines:
> java      7526       ff7admin 4809u     IPv6 0xbd2d651aa23b725d        0t0    TCP *:* (CLOSED)
> Doesn't this indicate the socket is closed?  Does this mean there is a reference being held in memory for that closed socket so its not getting garbage collected?
> Thanks,
> Ben

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

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.