views:

44

answers:

2

SimpleHttpConnectionManager being used incorrectly. Be sure that HttpMethod.releaseConnection() is always called and that only one thread and/or method is using this connection manager at a time.

Does Anyone know why this error shows up and is causes the files I want to download or to fail and retry or to download uncompleted

Thank you !

A: 

Does Anyone know why this error shows up and is causes the files I want to download or to fail and retry or to download uncompleted?

Most likely a bug in the application that is trying to do the downloading. But without some more context (e.g. source code, stack traces) we'd are left with guesswork as the only "tool" to figure out what the actual bug is.

Stephen C
+1  A: 

Make sure that you don't use SimpleHttpConnectionManager to create and use connections from multiple threads. The simple connection manager is not designed for it - it returns always the same connection, and this is not thread safe.

In a multi-threaded environment, use a different manager that uses a pool of connections. See MultiThreadedHttpConnectionManager.

Eyal Schneider
Thank you The code was giving it a default httpclient , which comes with a default simplehttpconnection , so I changed it and forced it to take a multithreadedhhttpconnectionmanager.
MArio