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 / January 2006

Tip: Looking for answers? Try searching our database.

Threads & Sockets Issue

Thread view: 
RA - 27 Jan 2006 07:30 GMT
Hello!

Background:
------------------

I have a server running in Windows 2003 that is waiting for connections
on a TCP port.

For each client that connects, two separate threads are started. One is
for reading the data coming in from the client. The other is for
writing data to the client from a synchronized Vector.

The server is easily able to handle loads of up to 150 - 200 clients
connected at the same time.

Problem:
-------------

The problem that arises is rather odd ... after 3-4 hours of running
properly, quite a few clients are booted out of the system. There are
exceptions in reading or, writing to their sockets and the server
thinks they are no longer available.

This "boot" results in 50-60% of the clients being disconnected
simultaneously.

Any ideas on why this is happening?
Thomas Weidenfeller - 27 Jan 2006 08:54 GMT
> This "boot" results in 50-60% of the clients being disconnected
> simultaneously.
>
> Any ideas on why this is happening?

The standard answer to such questions is:

Gather more data!

Use a network sniffer like Ethereal to find out what is going on on the
wire. Is there something happening in the network? Which site is closing
the connection. Is it closed or reset?

It tremendously helps to know which party is at fault (server, client,
network) and on what protocol level it happens, when trying to debug
such things.

/Thomas
Signature

The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/

rajatag - 27 Jan 2006 11:42 GMT
Thank you for your reply.

After further debugging, I have noticed that the clients are being
booted off because the read thread is getting a socket exception.

This starts with any one client and then goes on to exceptions thrown
by other clients who are logged in.

What kind of information do you suggest I analyze from Ethereal? Seems
to me network activity is fine ...

Thanks!
RA


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



©2009 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.