I have a client that constantly talks to a server via http using android-annotations's RestClient.
Every time the app is open for a long time and lots of requests have been made, new http requests simply timeout with no result and no error from the server side. Closing the app and opening it up again fixes everything.
I'm not really sure but I'm guessing it has something to do with the following parameters:
HttpClient client = new HttpClient();
client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
client.setMaxConnectionsPerAddress(200); // max 200 concurrent connections to every address
client.setThreadPool(new QueuedThreadPool(250)); // max 250 threads
client.setTimeout(30000); // 30 seconds timeout; if no server reply, the request expires
client.start();
So, my question is, what happens after the limit of 200 maxConnectionsPerAddress
have been made? Could this be the reason my network connection hangs after too many requests? If so, can I simply increase this number or are there any performance issues in doing so?