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 Oleg Kalnichevski <ol...@apache.org> on 2008/09/02 20:11:40 UTC

Re: BindException problem in multithreaded http client

On Sat, 2008-08-30 at 20:50 -0400, Tomek Maciejewski wrote:
> Hi,
> I am trying to write a multithreaded crawler. I would like to execute
> http requests simultaneously. 

...

> 
> I use a one instance of this client. The instance is marked as static
> and final. But after executing some number of requests I start to get
> a java.net.BindException with message "Address already in use" almost
> every time I want to execute request. The code responsible for
> executing requests is below (HTTP_CLIENT is a instance of the class I
> mentioned above):
> 

...


> Could you tell me what am I doing wrong? I thought that maybe I don't
> release the connection and I don't unbind sockets, but in finally
> section I use consumeContent() method which should do that.
> 

Tomek,

(1) What platform (OS) are you using? Quite often BindException are
caused by platform specific TCP/IP settings. 

(2) You can turn on context logging in order to see if connections get
really reused or not. If they do, this would suggest a TCP/IP stack
configuration issue. 

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: BindException problem in multithreaded http client

Posted by Tomek Maciejewski <to...@gmail.com>.
Thanks Oleg, I supposed it could be a problem. I will change crawler 
architecture a little, to generate less connections simultaneously. So 
OS will have more time to release the sockets. I saw that it is possible 
to change the number of client ports in WinXP but I'm not sure if it 
would be a proper way to deal with this kind of problem.

Cheers,
Tomek

Oleg Kalnichevski wrote:
> On Wed, 2008-09-03 at 16:03 -0400, Tomek Maciejewski wrote:
>   
>> Hi Oleg,
>>
>> Thank for your reply. I have got the latest code from repository, but 
>> the problem didn't disappear. I saved the logs here: 
>> http://pentium.hopto.org/~thinred/files/output.zip
>> At the end of the crawler execution I started to get BindException. I 
>> would appreciate if you could see this logs, because actually I don't 
>> understand what is a relation between not reused connections and this 
>> bind exception. What is the nature of this problem, and why it tries to 
>> bind to 'address already in use'? Is there any way to solve this problem?
>>
>> Cheers,
>> Tomek
>>
>>
>>     
>
> It is all pretty simple. Please examine response messages in the log.
> Most of them (if not all) have "Connection: close" header, which means
> the server does not want the connection to be kept alive. As a result
> connections do not get reused. Every time a new request is executed, a
> new socket has to be open. Every time a new socket is open, a client
> port has to be allocated. Windows (per default) allocates the range from
> 1024 to 5000 for client ports. It usually takes a while before a used
> client port gets released back to the pool. If you execute 4000 requests
> in a tight loop you are pretty much bound to run out of client ports and
> end up with a bunch of BindExceptions
>
> Hope this helps
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: BindException problem in multithreaded http client

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2008-09-03 at 16:03 -0400, Tomek Maciejewski wrote:
> Hi Oleg,
> 
> Thank for your reply. I have got the latest code from repository, but 
> the problem didn't disappear. I saved the logs here: 
> http://pentium.hopto.org/~thinred/files/output.zip
> At the end of the crawler execution I started to get BindException. I 
> would appreciate if you could see this logs, because actually I don't 
> understand what is a relation between not reused connections and this 
> bind exception. What is the nature of this problem, and why it tries to 
> bind to 'address already in use'? Is there any way to solve this problem?
> 
> Cheers,
> Tomek
> 
> 

It is all pretty simple. Please examine response messages in the log.
Most of them (if not all) have "Connection: close" header, which means
the server does not want the connection to be kept alive. As a result
connections do not get reused. Every time a new request is executed, a
new socket has to be open. Every time a new socket is open, a client
port has to be allocated. Windows (per default) allocates the range from
1024 to 5000 for client ports. It usually takes a while before a used
client port gets released back to the pool. If you execute 4000 requests
in a tight loop you are pretty much bound to run out of client ports and
end up with a bunch of BindExceptions

Hope this helps

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: BindException problem in multithreaded http client

Posted by Tomek Maciejewski <to...@gmail.com>.
Hi Oleg,

Thank for your reply. I have got the latest code from repository, but 
the problem didn't disappear. I saved the logs here: 
http://pentium.hopto.org/~thinred/files/output.zip
At the end of the crawler execution I started to get BindException. I 
would appreciate if you could see this logs, because actually I don't 
understand what is a relation between not reused connections and this 
bind exception. What is the nature of this problem, and why it tries to 
bind to 'address already in use'? Is there any way to solve this problem?

Cheers,
Tomek


Oleg Kalnichevski wrote:
> Tomek,
>
> I improved some of the DEBUG log statements and reduced the amount of
> noise in the logs. Feel free to get the latest code snapshot from SVN
> trunk and retest with your application.
>
> Cheers
>
> Oleg
>
> On Wed, 2008-09-03 at 12:27 +0200, Oleg Kalnichevski wrote:
>   
>> On Tue, 2008-09-02 at 17:57 -0400, Tomek Maciejewski wrote:
>>     
>>> Thanks Oleg, now it works. Earlier I used System.setProperty to enable 
>>> logging but I get only WARN level logging, I don't know if the 
>>> properties are case-sensitive because I set the same properties. Only 
>>> difference was that I wrote "debug" instead of "debug".
>>> Generally, with the debug enabled I don't get the exception. Maybe it is 
>>> because, the crawler runs a little slower because of logging operation 
>>> and saving them to output?
>>>       
>> Can be.
>>
>>     
>>> In the logs I found that the connection is created 3715 times and in the 
>>> client I have the limit of 100 connections. Generally I often see 
>>> something like that:
>>>
>>> [DEBUG] ThreadSafeClientConnManager - Released connection open but not 
>>> marked reusable.
>>> [DEBUG] DefaultClientConnection - Connection shut down
>>> [DEBUG] ConnPoolByRoute - Freeing connection 
>>> [HttpRoute[{}->http://www.mrw.interscience.wiley.com]][null]
>>> [DEBUG] ConnPoolByRoute - Creating new connection 
>>> [HttpRoute[{}->http://www.mrw.interscience.wiley.com]]
>>> [DEBUG] ThreadSafeClientConnManager - 
>>> ThreadSafeClientConnManager.getConnection: 
>>> HttpRoute[{}->http://www.mrw.interscience.wiley.com], timeout = 0
>>>
>>> So the connection is not marked as reusable? Could it be a reason of my 
>>> BindException problems?
>>>       
>> Yes, this is precisely the reason. I cannot say why the connection got
>> marked as non-reusable in the first place without seeing the complete
>> context log.
>>
>> Oleg
>>
>>     
>>> I execute connections very simultaneously, right now there may be about 
>>> 600 threads in executors and every of them invokes 'execute method' on 
>>> httpclient object.
>>>       
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: BindException problem in multithreaded http client

Posted by Oleg Kalnichevski <ol...@apache.org>.
Tomek,

I improved some of the DEBUG log statements and reduced the amount of
noise in the logs. Feel free to get the latest code snapshot from SVN
trunk and retest with your application.

Cheers

Oleg

On Wed, 2008-09-03 at 12:27 +0200, Oleg Kalnichevski wrote:
> On Tue, 2008-09-02 at 17:57 -0400, Tomek Maciejewski wrote:
> > Thanks Oleg, now it works. Earlier I used System.setProperty to enable 
> > logging but I get only WARN level logging, I don't know if the 
> > properties are case-sensitive because I set the same properties. Only 
> > difference was that I wrote "debug" instead of "debug".
> > Generally, with the debug enabled I don't get the exception. Maybe it is 
> > because, the crawler runs a little slower because of logging operation 
> > and saving them to output?
> 
> Can be.
> 
> > In the logs I found that the connection is created 3715 times and in the 
> > client I have the limit of 100 connections. Generally I often see 
> > something like that:
> > 
> > [DEBUG] ThreadSafeClientConnManager - Released connection open but not 
> > marked reusable.
> > [DEBUG] DefaultClientConnection - Connection shut down
> > [DEBUG] ConnPoolByRoute - Freeing connection 
> > [HttpRoute[{}->http://www.mrw.interscience.wiley.com]][null]
> > [DEBUG] ConnPoolByRoute - Creating new connection 
> > [HttpRoute[{}->http://www.mrw.interscience.wiley.com]]
> > [DEBUG] ThreadSafeClientConnManager - 
> > ThreadSafeClientConnManager.getConnection: 
> > HttpRoute[{}->http://www.mrw.interscience.wiley.com], timeout = 0
> > 
> > So the connection is not marked as reusable? Could it be a reason of my 
> > BindException problems?
> 
> Yes, this is precisely the reason. I cannot say why the connection got
> marked as non-reusable in the first place without seeing the complete
> context log.
> 
> Oleg
> 
> > I execute connections very simultaneously, right now there may be about 
> > 600 threads in executors and every of them invokes 'execute method' on 
> > httpclient object.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: BindException problem in multithreaded http client

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2008-09-02 at 17:57 -0400, Tomek Maciejewski wrote:
> Thanks Oleg, now it works. Earlier I used System.setProperty to enable 
> logging but I get only WARN level logging, I don't know if the 
> properties are case-sensitive because I set the same properties. Only 
> difference was that I wrote "debug" instead of "debug".
> Generally, with the debug enabled I don't get the exception. Maybe it is 
> because, the crawler runs a little slower because of logging operation 
> and saving them to output?

Can be.

> In the logs I found that the connection is created 3715 times and in the 
> client I have the limit of 100 connections. Generally I often see 
> something like that:
> 
> [DEBUG] ThreadSafeClientConnManager - Released connection open but not 
> marked reusable.
> [DEBUG] DefaultClientConnection - Connection shut down
> [DEBUG] ConnPoolByRoute - Freeing connection 
> [HttpRoute[{}->http://www.mrw.interscience.wiley.com]][null]
> [DEBUG] ConnPoolByRoute - Creating new connection 
> [HttpRoute[{}->http://www.mrw.interscience.wiley.com]]
> [DEBUG] ThreadSafeClientConnManager - 
> ThreadSafeClientConnManager.getConnection: 
> HttpRoute[{}->http://www.mrw.interscience.wiley.com], timeout = 0
> 
> So the connection is not marked as reusable? Could it be a reason of my 
> BindException problems?

Yes, this is precisely the reason. I cannot say why the connection got
marked as non-reusable in the first place without seeing the complete
context log.

Oleg

> I execute connections very simultaneously, right now there may be about 
> 600 threads in executors and every of them invokes 'execute method' on 
> httpclient object.



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: BindException problem in multithreaded http client

Posted by Tomek Maciejewski <to...@gmail.com>.
Thanks Oleg, now it works. Earlier I used System.setProperty to enable 
logging but I get only WARN level logging, I don't know if the 
properties are case-sensitive because I set the same properties. Only 
difference was that I wrote "debug" instead of "debug".
Generally, with the debug enabled I don't get the exception. Maybe it is 
because, the crawler runs a little slower because of logging operation 
and saving them to output?
In the logs I found that the connection is created 3715 times and in the 
client I have the limit of 100 connections. Generally I often see 
something like that:

[DEBUG] ThreadSafeClientConnManager - Released connection open but not 
marked reusable.
[DEBUG] DefaultClientConnection - Connection shut down
[DEBUG] ConnPoolByRoute - Freeing connection 
[HttpRoute[{}->http://www.mrw.interscience.wiley.com]][null]
[DEBUG] ConnPoolByRoute - Creating new connection 
[HttpRoute[{}->http://www.mrw.interscience.wiley.com]]
[DEBUG] ThreadSafeClientConnManager - 
ThreadSafeClientConnManager.getConnection: 
HttpRoute[{}->http://www.mrw.interscience.wiley.com], timeout = 0

So the connection is not marked as reusable? Could it be a reason of my 
BindException problems?
I execute connections very simultaneously, right now there may be about 
600 threads in executors and every of them invokes 'execute method' on 
httpclient object.

Tomek
> On Tue, 2008-09-02 at 16:12 -0400, Tomek Maciejewski wrote:
>   
>> Hi Oleg,
>>
>> I am using Windows XP 32bit. I turned on context logging but I didn't 
>> see anything interesting.
>>     
>
> Are you seeing any DEBUG logs? Anyways, pass the following parameters to
> the JRE upon the start up:
>
> -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.log.org.apache.http.impl.conn=DEBUG -Dorg.apache.commons.logging.simplelog.log.org.apache.http.headers=DEBUG
>
> This should result in DEBUG logs getting printed to the stdout and
> should give you enough details to help understand what may be causing
> problems with the reuse of connections. 
>
> For instance, this is a good example of connection not being reused due
> to connections being closed on the server side
>
> [DEBUG] ThreadSafeClientConnManager -
> ThreadSafeClientConnManager.getConnection:
> HttpRoute[{}->http://www.yahoo.com], timeout = 0
> [DEBUG] ConnPoolByRoute - Total connections kept alive: 0
> [DEBUG] ConnPoolByRoute - Total issued connections: 0
> [DEBUG] ConnPoolByRoute - Total allocated connection: 0 out of 200
> [DEBUG] ConnPoolByRoute - No free connections
> [HttpRoute[{}->http://www.yahoo.com]][null]
> [DEBUG] ConnPoolByRoute - Available capacity: 20 out of 20
> [HttpRoute[{}->http://www.yahoo.com]][null]
> [DEBUG] ConnPoolByRoute - Creating new connection
> [HttpRoute[{}->http://www.yahoo.com]]
> [DEBUG] DefaultClientConnection - Connection closed
> [DEBUG] headers - >> GET / HTTP/1.1
> [DEBUG] headers - >> Host: www.yahoo.com
> [DEBUG] headers - >> Connection: Keep-Alive
> [DEBUG] headers - >> User-Agent: Apache-HttpClient/4.0
> [DEBUG] headers - << HTTP/1.1 200 OK
> [DEBUG] headers - << Date: Tue, 02 Sep 2008 20:54:27 GMT
> [DEBUG] headers - << P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml",
> CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR
> DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA
> POL HEA PRE GOV"
> [DEBUG] headers - << Cache-Control: private
> [DEBUG] headers - << Vary: User-Agent
> [DEBUG] headers - << X-XRDS-Location:
> http://open.login.yahooapis.com/openid20/www.yahoo.com/xrds
> [DEBUG] headers - << Last-Modified: Tue, 02 Sep 2008 20:50:37 GMT
> [DEBUG] headers - << Accept-Ranges: bytes
> [DEBUG] headers - << Content-Length: 9562
> [DEBUG] headers - << Connection: close
> [DEBUG] headers - << Content-Type: text/html; charset=utf-8
> [DEBUG] ThreadSafeClientConnManager - Released connection open but not
> marked reusable.
> [DEBUG] DefaultClientConnection - Connection shut down
> [DEBUG] ConnPoolByRoute - Freeing connection
> [HttpRoute[{}->http://www.yahoo.com]][null]
> [DEBUG] ConnPoolByRoute - Notifying no-one, there are no waiting threads
>
> Hope this helps
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: BindException problem in multithreaded http client

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2008-09-02 at 16:12 -0400, Tomek Maciejewski wrote:
> Hi Oleg,
> 
> I am using Windows XP 32bit. I turned on context logging but I didn't 
> see anything interesting.

Are you seeing any DEBUG logs? Anyways, pass the following parameters to
the JRE upon the start up:

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.log.org.apache.http.impl.conn=DEBUG -Dorg.apache.commons.logging.simplelog.log.org.apache.http.headers=DEBUG

This should result in DEBUG logs getting printed to the stdout and
should give you enough details to help understand what may be causing
problems with the reuse of connections. 

For instance, this is a good example of connection not being reused due
to connections being closed on the server side

[DEBUG] ThreadSafeClientConnManager -
ThreadSafeClientConnManager.getConnection:
HttpRoute[{}->http://www.yahoo.com], timeout = 0
[DEBUG] ConnPoolByRoute - Total connections kept alive: 0
[DEBUG] ConnPoolByRoute - Total issued connections: 0
[DEBUG] ConnPoolByRoute - Total allocated connection: 0 out of 200
[DEBUG] ConnPoolByRoute - No free connections
[HttpRoute[{}->http://www.yahoo.com]][null]
[DEBUG] ConnPoolByRoute - Available capacity: 20 out of 20
[HttpRoute[{}->http://www.yahoo.com]][null]
[DEBUG] ConnPoolByRoute - Creating new connection
[HttpRoute[{}->http://www.yahoo.com]]
[DEBUG] DefaultClientConnection - Connection closed
[DEBUG] headers - >> GET / HTTP/1.1
[DEBUG] headers - >> Host: www.yahoo.com
[DEBUG] headers - >> Connection: Keep-Alive
[DEBUG] headers - >> User-Agent: Apache-HttpClient/4.0
[DEBUG] headers - << HTTP/1.1 200 OK
[DEBUG] headers - << Date: Tue, 02 Sep 2008 20:54:27 GMT
[DEBUG] headers - << P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml",
CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR
DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA
POL HEA PRE GOV"
[DEBUG] headers - << Cache-Control: private
[DEBUG] headers - << Vary: User-Agent
[DEBUG] headers - << X-XRDS-Location:
http://open.login.yahooapis.com/openid20/www.yahoo.com/xrds
[DEBUG] headers - << Last-Modified: Tue, 02 Sep 2008 20:50:37 GMT
[DEBUG] headers - << Accept-Ranges: bytes
[DEBUG] headers - << Content-Length: 9562
[DEBUG] headers - << Connection: close
[DEBUG] headers - << Content-Type: text/html; charset=utf-8
[DEBUG] ThreadSafeClientConnManager - Released connection open but not
marked reusable.
[DEBUG] DefaultClientConnection - Connection shut down
[DEBUG] ConnPoolByRoute - Freeing connection
[HttpRoute[{}->http://www.yahoo.com]][null]
[DEBUG] ConnPoolByRoute - Notifying no-one, there are no waiting threads

Hope this helps

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: BindException problem in multithreaded http client

Posted by Tomek Maciejewski <to...@gmail.com>.
Hi Oleg,

I am using Windows XP 32bit. I turned on context logging but I didn't 
see anything interesting. How to check if the connections get really 
reused? The only thing I see are the 'Invalid Cookies' (expired) warns.

This is the exception stack I get:

java.net.BindException: Address already in use: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:519)
    at 
org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:106)
    at 
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:129)
    at 
org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
    at 
org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
    at 
org.apache.http.impl.client.DefaultClientRequestDirector.execute(DefaultClientRequestDirector.java:309)
    at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:501)
    at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:456)
    at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:422)
    at 
ca.uottawa.met3.crawler.http.HttpEngine.getSiteAsStream(HttpEngine.java:96)
    at 
ca.uottawa.met3.crawler.engine.AbstractParser.readSite(AbstractParser.java:60)
    at 
ca.uottawa.met3.crawler.engine.AbstractParser.parseSite(AbstractParser.java:40)
    at 
ca.uottawa.met3.crawler.parsers.PaperParser.fillLink(PaperParser.java:36)
    at 
ca.uottawa.met3.crawler.MultiThreadedCrawlerController$PaperParsingTask.run(MultiThreadedCrawlerController.java:184)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)


Tomek

Oleg Kalnichevski wrote:
> On Sat, 2008-08-30 at 20:50 -0400, Tomek Maciejewski wrote:
>   
>> Hi,
>> I am trying to write a multithreaded crawler. I would like to execute
>> http requests simultaneously. 
>>     
>
> ...
>
>   
>> I use a one instance of this client. The instance is marked as static
>> and final. But after executing some number of requests I start to get
>> a java.net.BindException with message "Address already in use" almost
>> every time I want to execute request. The code responsible for
>> executing requests is below (HTTP_CLIENT is a instance of the class I
>> mentioned above):
>>
>>     
>
> ...
>
>
>   
>> Could you tell me what am I doing wrong? I thought that maybe I don't
>> release the connection and I don't unbind sockets, but in finally
>> section I use consumeContent() method which should do that.
>>
>>     
>
> Tomek,
>
> (1) What platform (OS) are you using? Quite often BindException are
> caused by platform specific TCP/IP settings. 
>
> (2) You can turn on context logging in order to see if connections get
> really reused or not. If they do, this would suggest a TCP/IP stack
> configuration issue. 
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org