You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by I....@klaverblad.nl on 2006/10/03 09:30:05 UTC
Betr.: Re: Connection refused exception
Hi Roland and others,
I abort the post method and release the connection after each request.
Also, I have set 'Connection: close' in the request header. The whole block
of code where the post method is created and the request is executed, read
and released, is synchronized.
I thought all of this meant that the server did not have to deal with any
simultaneous requests. But it still seems that something, somewhere is left
open. (I am the only one testing on this server at the moment).
Regards,
Iris
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: Betr.: Re: Connection refused exception
Posted by Roland Weber <ht...@dubioso.net>.
Hello Iris,
> I abort the post method and release the connection after each request.
> Also, I have set 'Connection: close' in the request header. The whole block
> of code where the post method is created and the request is executed, read
> and released, is synchronized.
>
> I thought all of this meant that the server did not have to deal with any
> simultaneous requests. But it still seems that something, somewhere is left
> open. (I am the only one testing on this server at the moment).
1. Sending only one request at a time somehow contradicts your goal
of testing the server performance, doesn't it?
2. If you abort the POST method rather than reading the response body,
won't that affect the test results? Generating the response body
might be a non-trivial effort.
3. Aborting the request is a purely local operation. HttpClient closes
the connection. That does not necessarily mean that the server is
immediately aware of the connection being closed. It might consider
the connection as open for a while, and it might keep a database
connection open as long as it expects to need it for generating
the response.
You should read the responses to the end and then release the connection
gracefully. Then the server will generate all markup and *knows* that
it's done after sending it.
hope that helps,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org