Hi

I have never seen this line(Unable to get a connection, waiting...) in the log, 
so I don't think that the problem. I have method.releaseconnection() in finally.

I don't have control over the target machine, but I don't think they perform 
dynamic connection rate limiting. 

Oleg thinks it's the ssl handshake thats the problem. I have send another mail 
containing ssl handshake debug.
Ssl handshake contain a certification chain after an hour but not before an 
hour. What this means I don't know - any ideas?

Kim Andersen

-----Oprindelig meddelelse-----
Fra: Ortwin Glück [mailto:[EMAIL PROTECTED] 
Sendt: 6. januar 2006 13:47
Til: HttpClient Project
Emne: Re: SV: Slow to open connection after an hour or so




Kim B. Andersen wrote:
> httpclient client = new hhtpClient();
> method = new getMethod(url);
> client.execute(method);
> ...
> ...
> method.releaseconnection();

Please put a finally clause around releaseConnection, just to make sure 
it is called even when an exception occurs.

> How can I see if the pool is empty?

If you get a line in the log like:
Unable to get a connection, waiting...
then the pool is empty.

> * Maybe attach a debugger / profiler or use jconsole
> I have never played with these tools so I don't no how at the moment. I will 
> try to look into it, but if you can recommend some website to read or 
> describe how to - I would appreciated alot.

Sorry, we are not offering free online courses in software engineering. 
Please use other resources.

> First hour
> 
> 2006/01/03 14:46:49:926 CET [DEBUG] HttpConnection - Open connection to 
> fastnetselvbetjening.tdconline.dk:443
> 2006/01/03 14:46:50:038 CET [DEBUG] header - >> "GET /Krump/Alivetest.do?ws 
> HTTP/1.1[\r][\n]"

> After the first hour
> 
> 2006/01/04 07:58:50:230 CET [DEBUG] HttpConnection - Open connection to 
> fastnetselvbetjening.tdconline.dk:443
> 2006/01/04 07:58:59:230 CET [DEBUG] header - >> "GET 
> /Krump/Alivetest/alivetester1.html HTTP/1.1[\r][\n]"

That's definitely helpful. The connection pool is apparently NOT the 
problem. But it takes longer when actually opening the connection. As to 
why that happens I can only speculate. Do you have control over the 
target host? Is it possible that they perform some dynamic connection 
rate limiting?

Cheers

Ortwin Glück

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to