[
https://issues.apache.org/jira/browse/XMLRPC-169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alan Burlison updated XMLRPC-169:
---------------------------------
Description:
An instance of XmlRpcSunHttpTransport creates a new connection to the server
for every request that is made via it. That's *horrendously* expensive where
the connection is a SSL connection.
Here's a trace, note the repeated connect() calls.
/2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
/2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
/2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
/2: send(20, " P O S T / H T T P /".., 283, 0) = 283
/2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
/2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
/2: read(20, " < ? x m l v e r s i o".., 8108) = 202
/2: ioctl(20, FIONREAD, 0xFE32E684) = 0
/2: fcntl(21, F_DUP2FD, 0x00000014) = 20
/2: close(20) = 0
/2: so_socket(PF_INET6, SOCK_STREAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) =
20
/2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
/2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
/2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
/2: send(20, " P O S T / H T T P /".., 283, 0) = 283
/2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
/2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
/2: read(20, " < ? x m l v e r s i o".., 8108) = 202
/2: ioctl(20, FIONREAD, 0xFE32E684) = 0
/2: fcntl(21, F_DUP2FD, 0x00000014) = 20
/2: close(20) = 0
/2: so_socket(PF_INET6, SOCK_STREAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) =
20
/2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
/2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
/2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
/2: send(20, " P O S T / H T T P /".., 283, 0) = 283
/2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
/2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
/2: read(20, " < ? x m l v e r s i o".., 8108) = 202
/2: ioctl(20, FIONREAD, 0xFE32E684) = 0
/2: fcntl(21, F_DUP2FD, 0x00000014) = 20
/2: close(20) = 0
/2: so_socket(PF_INET6, SOCK_STREAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) =
20
/2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
/2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
/2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
/2: send(20, " P O S T / H T T P /".., 283, 0) = 283
/2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
/2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
/2: read(20, " < ? x m l v e r s i o".., 8108) = 202
/2: ioctl(20, FIONREAD, 0xFE32E684) = 0
/2: fcntl(21, F_DUP2FD, 0x00000014) = 20
/2: close(20) = 0
And if you assume that a major use of the Apache XML-RPC client is with the
Apache XML-RPC server, it means the keepalive support in the server is a total
waste of time.
Here's the culprit, in XmlRpcSunHttpTransport.sendReques
final URLConnection c = conn = newURLConnection(config.getServerURL());
I think there's a missing check in there to see if a connection has already
been established & stored - the "c = conn" bit looks rather odd - the
connection is cached in XmlRpcSunHttpTransport.conn, but never actually used
anywhere.
was:
An instance of XmlRpcClient creates a new connection to the server for every
request that is made via it. That's *horrendously* expensive where the
connection is a SSL connection.
Here's a trace, note the repeated connect() calls.
/2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
/2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
/2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
/2: send(20, " P O S T / H T T P /".., 283, 0) = 283
/2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
/2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
/2: read(20, " < ? x m l v e r s i o".., 8108) = 202
/2: ioctl(20, FIONREAD, 0xFE32E684) = 0
/2: fcntl(21, F_DUP2FD, 0x00000014) = 20
/2: close(20) = 0
/2: so_socket(PF_INET6, SOCK_STREAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) =
20
/2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
/2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
/2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
/2: send(20, " P O S T / H T T P /".., 283, 0) = 283
/2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
/2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
/2: read(20, " < ? x m l v e r s i o".., 8108) = 202
/2: ioctl(20, FIONREAD, 0xFE32E684) = 0
/2: fcntl(21, F_DUP2FD, 0x00000014) = 20
/2: close(20) = 0
/2: so_socket(PF_INET6, SOCK_STREAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) =
20
/2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
/2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
/2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
/2: send(20, " P O S T / H T T P /".., 283, 0) = 283
/2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
/2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
/2: read(20, " < ? x m l v e r s i o".., 8108) = 202
/2: ioctl(20, FIONREAD, 0xFE32E684) = 0
/2: fcntl(21, F_DUP2FD, 0x00000014) = 20
/2: close(20) = 0
/2: so_socket(PF_INET6, SOCK_STREAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) =
20
/2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
/2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
/2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
/2: send(20, " P O S T / H T T P /".., 283, 0) = 283
/2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
/2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
/2: read(20, " < ? x m l v e r s i o".., 8108) = 202
/2: ioctl(20, FIONREAD, 0xFE32E684) = 0
/2: fcntl(21, F_DUP2FD, 0x00000014) = 20
/2: close(20) = 0
And if you assume that a major use of the Apache XML-RPC client is with the
Apache XML-RPC server, it means the keepalive support in the server is a total
waste of time.
Summary: XmlRpcSunHttpTransport creates a new connection for every
request. (was: XmlRpcClient creates a new connection for every request.)
> XmlRpcSunHttpTransport creates a new connection for every request.
> ------------------------------------------------------------------
>
> Key: XMLRPC-169
> URL: https://issues.apache.org/jira/browse/XMLRPC-169
> Project: XML-RPC
> Issue Type: Bug
> Components: Source
> Affects Versions: 3.1.3
> Environment: Solaris
> Reporter: Alan Burlison
>
> An instance of XmlRpcSunHttpTransport creates a new connection to the server
> for every request that is made via it. That's *horrendously* expensive where
> the connection is a SSL connection.
> Here's a trace, note the repeated connect() calls.
> /2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
> /2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
> /2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
> /2: send(20, " P O S T / H T T P /".., 283, 0) = 283
> /2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
> /2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
> /2: read(20, " < ? x m l v e r s i o".., 8108) = 202
> /2: ioctl(20, FIONREAD, 0xFE32E684) = 0
> /2: fcntl(21, F_DUP2FD, 0x00000014) = 20
> /2: close(20) = 0
> /2: so_socket(PF_INET6, SOCK_STREAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) =
> 20
> /2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
> /2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
> /2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
> /2: send(20, " P O S T / H T T P /".., 283, 0) = 283
> /2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
> /2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
> /2: read(20, " < ? x m l v e r s i o".., 8108) = 202
> /2: ioctl(20, FIONREAD, 0xFE32E684) = 0
> /2: fcntl(21, F_DUP2FD, 0x00000014) = 20
> /2: close(20) = 0
> /2: so_socket(PF_INET6, SOCK_STREAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) =
> 20
> /2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
> /2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
> /2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
> /2: send(20, " P O S T / H T T P /".., 283, 0) = 283
> /2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
> /2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
> /2: read(20, " < ? x m l v e r s i o".., 8108) = 202
> /2: ioctl(20, FIONREAD, 0xFE32E684) = 0
> /2: fcntl(21, F_DUP2FD, 0x00000014) = 20
> /2: close(20) = 0
> /2: so_socket(PF_INET6, SOCK_STREAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) =
> 20
> /2: connect(20, 0xFE32E4D0, 32, SOV_DEFAULT) = 0
> /2: getsockname(20, 0xFE32E4D0, 0xFE32E618, SOV_DEFAULT) = 0
> /2: setsockopt(20, tcp, TCP_NODELAY, 0xFE32E768, 4, SOV_DEFAULT) = 0
> /2: send(20, " P O S T / H T T P /".., 283, 0) = 283
> /2: send(20, " < ? x m l v e r s i o".., 215, 0) = 215
> /2: read(20, " H T T P / 1 . 0 2 0 0".., 8192) = 84
> /2: read(20, " < ? x m l v e r s i o".., 8108) = 202
> /2: ioctl(20, FIONREAD, 0xFE32E684) = 0
> /2: fcntl(21, F_DUP2FD, 0x00000014) = 20
> /2: close(20) = 0
> And if you assume that a major use of the Apache XML-RPC client is with the
> Apache XML-RPC server, it means the keepalive support in the server is a
> total waste of time.
> Here's the culprit, in XmlRpcSunHttpTransport.sendReques
> final URLConnection c = conn = newURLConnection(config.getServerURL());
> I think there's a missing check in there to see if a connection has already
> been established & stored - the "c = conn" bit looks rather odd - the
> connection is cached in XmlRpcSunHttpTransport.conn, but never actually used
> anywhere.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.