ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mayer, Daniel S" <>
Subject RE: random connection refusal
Date Thu, 25 Aug 2005 22:44:52 GMT
	Thanks that is helpful. 
	I ran netstat -a to see how many were in the wait state and there seem to be tons... like
a hundred in the wait state. Still almost all of my requests are handled just a few missing
here and there. I was thinking all of these in the waiting state might be kept open after
I have a client execute a request and return a result.
	Do I have to do anything on either the client side or server side to say after I return close
that socket I am done with it. I know that these sockets are eventually closing from some
time out because after I have closed all my programs for awhile they all still show up in
netstat with hundreds waiting and then all disappear pretty much at once a few minutes after
I closed everything.
	Or does this mean I am using the client wrong, by creating a new client and executing on
it each time I want to send / receive a result. Do I need to set up a dispatcher or something
and only use one static client the whole time? I am talking to multiple hosts so would it
be best to have one client per host?
	I added keepAlive(true) to both servers and clients, which seemed to help a lot and really
reduce how many were waiting all but eliminated from the local connections, but there are
still many many sockets from remote hosts in the wait state, when it should really only have
one or two connections going from each server at a time. It seems that eventually my messages
never go through after I build up a ton of messages in the wait state (which happens when
I am running 4 remote clients communicating with 2 threads all the time with the server. 
This does lead to a bug that someone has placed on the list or mentioned before where the
server keeps printing out java.util.NoSuchElementException, which doesn't seem to cause an
error in execution, but keeps being printed out with no other trace.
	When I was working with asynchronous awhile ago I ran into another similar reported error
that even had a patch suggested for the fix, but didn't have the patch applied in the binary
release which seems outdated, so I had to get the code from CVS and apply the patch myself.

	I am scared to ask but after going through the bug tracking for this project (
, there seems to be many unresolved bugs, some of which have solutions or patches on the web,
but don't seem to be resolved on the tracking system. So is the development of this project
still active? Is it safe to rely on XML RPC for software that should run 24/7 with a reboot
about once every 2 weeks? Has everyone doing this sort of thing moved to soap and JAX-rpc?
The amount of open bug fixes has just made me a little nervous, and I haven't been following
xml-rpc very long. The user list still seems to be very active, but is the development? Anyways
thanks for your time, help, concern...
	Dan "I am nervous, I guess I should dance to some techno to relax" Man

	From: Schölver, Andreas [] 
	Sent: Tuesday, August 23, 2005 5:04 AM
	Subject: RE: random connection refusal
	my thoughts...
	the runtime behaviour depends on several things:
	- the version of java (maybe)
	- the OS of the machine where the server runs on (definitely!)
	- some socket configuration settings
	- more or less client ports available
	- shorter or longer timeoutouts
	  (ever tried 'netstat -a' to see how many connections are in WAIT state ?)
	i did a simple performance test:
	client creates new threads for a period of 30 minutes as fast as possible,
	service method does nothing more than adding two supplied values
	and returning the results.
	on linux (@1,6 GHz) the test managed to start more than 
	500000 threads - no exceptions occurred.
	on windows (@2,5 GHz) i had to insert Thread.sleep( 100 ) to slow down the client
	to avoid exceptions like ' Connection refused: connect'.
	this left me with only 17614 threads started during 30 minutes of runtime.
	-----Original Message-----
	From: Mayer, Daniel S [] 
	Sent: Friday, August 19, 2005 10:48 PM
	Subject: random connection refusal
	I have a server that is dealing with many connections and many calls... It seems that after
running awhile a client gets random connection refused: connect
	So when I have threads for all of the handlers and the server is running at less than 2%
cpu, and as I understand it running its own thread pool for connections made to the socket,
why would a connection ever be refused? If am sending many requests very fast, should I be
initializing the thread pool to something different than the default for the xml rpc server?
I have certain xml rpc messages that are critical and I really want to guarantee the message
is sent / received. Currently the server handles other messages after this just fine and keeps
handling other requests quite fast, just randomly refuses a few connections here and there?
Ideas? Thoughts? Explanations? I am all wrong about everything in the entire universe? Don't
use XML RPC for critical messages? Don't wear white after labor day?
	Anyways any help would be appreciated, besides that xml RPC seems to be really great.
	Thanks in advance... 
	Dan "xml rpc for p2p is fun for me" Man

View raw message