Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

Java NIO disconnects unnoticed?

Thread view: 
Remon van Vliet - 29 Nov 2005 22:40 GMT
Hello,

I have (what i believe is) a particulary odd problem. I made a NIO based
server, and all worked fine until i started load testing. Local load testing
(both server and load test client running on my development machine) worked
fine and nothing odd happened when i closed the load testing client
(generating up to 4000 simultaneous disconnects until connection count
reached 0 as expected).

However, now that i started running the load test client on other machines
and the server locally i've run into an odd problem. It sees the first 100
or so disconnects if i close the load test client, but after that it just
stops noticing them. The selector thread (that does selector.select())
blocks nicely on the select as if no keys are ready to be read (obviously
all the disconnects should have set the ready ops for their associated keys
to OP_READ). I assumed the ready ops were just lost somehow, but when i
suspend the selector thread and inspect the keys it actually shows all as of
yet undisconnected keys as having readyOps neatly set to OP_READ. In other
words, all the keys related to the channels that were disconnected actually
have read operations waiting, but for some reason the select does not
actually return. My problem isnt fixed with using selectNow, if i do that
it'll run through the loop without ever selecting keys.

Does anyone have any idea what i may doing wrong, i was assuming all
channels will at some point notice they're disconnected (EOF-ed), which they
seem to do since their readyOps of their key are set accordingly, but
shouldnt this cause selector.select() to fill it's selectedKeys()
collection?

Kind regards,

Remon
Remon van Vliet - 01 Dec 2005 03:03 GMT
More detailed explanation :
http://forums.java.sun.com/thread.jspa?threadID=687103&tstart=0

> Hello,
>
[quoted text clipped - 28 lines]
>
> Remon


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.