PlanetJava
Custom Search

java-grinder-user
[Top] [All Lists]

grinder HTTPClient closing connection

Subject: grinder HTTPClient closing connection
Date: Thu, 11 Dec 2008 14:07:31 -0500
I have a simple jython script in Grinder (3.1) that sends http(1.1) posts to
tomcat (5.5) from console with agent configured for 1 process and 100
threads. The outgoing request has keep-alive in request header but the
response from tomcat does not have keep-alive set in header.
After receiving response HTTPClient plugin closes the connection. As
a result tomcat ends up after > 32K connections refusing new connections as
no more ports are available. Isn't HTTPClient supposed to
keep persistent connections by default? I  have attached the
request/response and jython script.
Thanks
 POST /solr/update HTTP/1.1
Host: xxx:8010
Connection: Keep-Alive, TE
TE: trailers
User-Agent: RPT-HTTPClient/0.3-3E
Content-type: application/octet-stream
Content-length: 140
<add><doc><field name="id">0</field><field
name="text">hello</field></doc></add>
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Last-Modified: Thu, 11 Dec 2008 17:05:35 GMT
ETag: "M2FkZWY3NjQ3ODgwMDAwMFNvbHI="
Content-Type: text/xml;charset=UTF-8
Content-Length: 249
Date: Thu, 11 Dec 2008 17:15:40 GMT
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int
name="QTime">0</int></lst><str name="WARNING">This response format is
experimental.  It is likely to change in the future.</str>
</response>
test.py
class TestRunner:
    def __call__(self):
        request = chatDetailsTest.wrap(
            HTTPRequest(url="xxx:8010/"))
                parameters = ( NVPair("Content-Type","text/xml"),)
        # This is the Jython way of creating an NVPair[] Java array
        # with one element.
        headers = zeros(1, NVPair)
        data='<add><doc><field name="id">0</field><field
name="text">hello</field></doc></add>';
        result = request.POST("/solr/update",data,headers)
       grinder.logger.output(str(result))
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
grinder-use mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/grinder-use
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy