You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Wangdu Gyalpo <wa...@yahoo.com> on 2010/03/23 17:45:24 UTC

close_wait problem

Hi guys,

After sending some requests to the xmlrpc server, i have found lots of connection in CLOSE_WAIT state using netstat command on the machine running the server.
I have found that CLOSE_WAIT connection state means that the program has not closed the connection.

And therefore, I wonder if you have had also similar problems that I have and how could I make sure that the connection is closed after the request is served to the client?

Thank you!

Wangdu


      

Re: close_wait problem

Posted by co...@cyberdeck.org.
I haven't observed any issues with CLOSE_WAIT sessions using XMLRPC.

That being said, I don't use the XMLRPC built in webserver either.
Instead, I use XmlRpcServlet with an embedded Jetty server.  For my needs
(SSL, HTTP/1.1 streaming connections, etc) it made more sense.

It's not that hard to setup, so might be a good solution even for the
general sense.

Something like this:

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;

public class MyServer {
	public static void main(String[] args) throws Exception {
		Server server = new Server(8080);
		ServletContextHandler context = new
ServletContextHandler(server, "/", ServletContextHandler.SESSIONS);

		XmlRpcServlet servlet = new XmlRpcServlet();
		context.addServlet(new ServletHolder(servlet), "/*");

		server.start();
		server.join();
	}
}

>From there you simply use XmlRpcServlet as documented for XMLRPC.

-Steve

On Tue, 23 Mar 2010, Wangdu Gyalpo wrote:

> Hi guys,
>
> After sending some requests to the xmlrpc server, i have found lots of connection in CLOSE_WAIT state using netstat command on the machine running the server.
> I have found that CLOSE_WAIT connection state means that the program has not closed the connection.
>
> And therefore, I wonder if you have had also similar problems that I have and how could I make sure that the connection is closed after the request is served to the client?
>
> Thank you!
>
> Wangdu
>
>
>