|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
HTTP Keep AliveHi all, I’m trying to run a load test using HTTP as the
protocol. The client application sends a “keep alive” HTTP header on
each request and keeps the connection opened. I noticed that the server closes the
connection even though keep alive was set. When this occurs, the client gets a
socket exception when it tries to write something, since the connection was
closed by the server. This is the output from the client before sending
each request: >> POST /services/DirectProxy HTTP/1.1 >> SOAPAction: urn:buyStocks.2 >> Content-Length: 512 >> Content-Type: text/xml; charset=UTF-8 >> Host: localhost:8090 >> Connection: Keep-Alive >> User-Agent: Jakarta-HttpComponents-Bench/1.1 If I set the load application for just two iterations,
the second iteration already gets an exception. What should I do to prevent the
server (Mule) from closing the connections? I’ve noticed that if I set
keepAlive=”true” on the HTTP connector, the server doesn’t
close the connection so often, but it still closes it from time to time,
although this keepAlive setting comes from the TCP connector (SO_KEEPALIVE) and
has nothing to do with the HTTP keep alive. ((((((Response from Iteration 1: 200 << HTTP/1.1 200 OK << Content-Type: text/xml;charset=UTF-8 << Expires: Mon, 30 Jun 2008 07:21:39 BRT << Date: Mon, 30 Jun 2008 22:21:39 GMT << Server: Apache-Coyote/1.1 << MULE_CORRELATION_ID:
e8bb6cbd-46f2-11dd-9e61-97cc4ddd01de << MULE_CORRELATION_GROUP_SIZE: -1 << MULE_CORRELATION_SEQUENCE: -1 << Transfer-Encoding: chunked ((((((((From the server log: INFO 2008-06-30 19:21:39,201
[HttpConnector.receiver.3] org.mule.transport.http .HttpMessageReceiver: Closing HTTP connection. (((((((When it tries to write on Iteration 2: java.net.SocketException: Software caused connection
abort: socket write error at
java.net.SocketOutputStream.socketWrite0(Native Method) at
java.net.SocketOutputStream.socketWrite(Unknown Source) at
java.net.SocketOutputStream.write(Unknown Source) at
org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSes sionOutputBuffer.java:109) at
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLength OutputStream.java:113) at
org.apache.http.entity.FileEntity.writeTo(FileEntity.java:83) at
org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializ er.java:97) at
org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(A bstractHttpClientConnection.java:161) at
org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpReques tExecutor.java:237) at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecu tor.java:119) at
org.apache.http.contrib.benchmark.BenchmarkWorker.run(BenchmarkWorker .java:160) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source ) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
java.lang.Thread.run(Unknown Source) I/O error: Software caused connection abort: socket
write error |
|
|
RE: HTTP Keep AliveAn aditional note: This behavior may explain
why the benchmark test by WSO2 (http://wso2.org/library/3740)
observed a consistent request drop of 1%. It seems that the HTTP connection
closes consistently 1 time after 100 requests. Since I’m using the same load
application, this means 1 write error for each 100 requests. Marcio. From: Marcio Miranda
[mailto:marcio.miranda@...] Hi all, I’m trying to run a load test using HTTP as the
protocol. The client application sends a “keep alive” HTTP header
on each request and keeps the connection opened. I noticed that the server
closes the connection even though keep alive was set. When this occurs, the
client gets a socket exception when it tries to write something, since the
connection was closed by the server. This is the output from the client before sending
each request: >> POST /services/DirectProxy HTTP/1.1 >> SOAPAction: urn:buyStocks.2 >> Content-Length: 512 >> Content-Type: text/xml; charset=UTF-8 >> Host: localhost:8090 >> Connection: Keep-Alive >> User-Agent: Jakarta-HttpComponents-Bench/1.1 If I set the load application for just two
iterations, the second iteration already gets an exception. What should I do to
prevent the server (Mule) from closing the connections? I’ve noticed that
if I set keepAlive=”true” on the HTTP connector, the server
doesn’t close the connection so often, but it still closes it from time
to time, although this keepAlive setting comes from the TCP connector
(SO_KEEPALIVE) and has nothing to do with the HTTP keep alive. ((((((Response from Iteration 1: 200 << HTTP/1.1 200 OK << Content-Type: text/xml;charset=UTF-8 << Expires: Mon, 30 Jun 2008 07:21:39 BRT << Date: Mon, 30 Jun 2008 22:21:39 GMT << Server: Apache-Coyote/1.1 << MULE_CORRELATION_ID:
e8bb6cbd-46f2-11dd-9e61-97cc4ddd01de << MULE_CORRELATION_GROUP_SIZE: -1 << MULE_CORRELATION_SEQUENCE: -1 << Transfer-Encoding: chunked ((((((((From the server log: INFO 2008-06-30 19:21:39,201
[HttpConnector.receiver.3] org.mule.transport.http .HttpMessageReceiver: Closing HTTP connection. (((((((When it tries to write on Iteration 2: java.net.SocketException: Software caused connection
abort: socket write error at
java.net.SocketOutputStream.socketWrite0(Native Method) at
java.net.SocketOutputStream.socketWrite(Unknown Source) at java.net.SocketOutputStream.write(Unknown
Source) at
org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSes sionOutputBuffer.java:109) at
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLength OutputStream.java:113) at
org.apache.http.entity.FileEntity.writeTo(FileEntity.java:83) at
org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializ er.java:97) at
org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(A bstractHttpClientConnection.java:161) at
org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpReques tExecutor.java:237) at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecu tor.java:119) at
org.apache.http.contrib.benchmark.BenchmarkWorker.run(BenchmarkWorker .java:160) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source ) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
java.lang.Thread.run(Unknown Source) I/O error: Software caused connection abort: socket
write error |
| Free embeddable forum powered by Nabble | Forum Help |