You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Herve Eichwald (JIRA)" <ji...@apache.org> on 2013/02/06 07:11:12 UTC
[jira] [Created] (HTTPASYNC-35) Some requests never make it to the
callbacks function
Herve Eichwald created HTTPASYNC-35:
---------------------------------------
Summary: Some requests never make it to the callbacks function
Key: HTTPASYNC-35
URL: https://issues.apache.org/jira/browse/HTTPASYNC-35
Project: HttpComponents HttpAsyncClient
Issue Type: Bug
Reporter: Herve Eichwald
Priority: Critical
Hi,
I am not sure if I am using the code the right way but here is what I see: some requests do not throw any exceptions in the client.execute() method but they never go in one of the callbacks methods success, cancelled or failed. Is this something you experienced?
I am using this code (extract):
SortedMap<String, Long> connectionsAliveTime = Collections.synchronizedSortedMap(new TreeMap<String, Long>());
IOReactorConfig ioConfig = new IOReactorConfig();
ioConfig.setConnectTimeout(15000);
ioConfig.setSoTimeout(15000);
ioConfig.setIoThreadCount(10);
DefaultConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(ioConfig);
this.client = new DefaultHttpAsyncClient(new PoolingClientAsyncConnectionManager(ioReactor));
.....
client.execute(httpGet, callback);
Then just after the call to execute I put the url in a Map associated with a timestamp.
connectionsAliveTime.put(url, System.currentTimeMillis());
In all the three callback functions, I remove the url from the Map.
I run this on a lot of urls, and look each 30 seconds what I have in the Map (the Map is synchronized).
After 5 minutes, I see a lot of urls which are still in the Map for more than 2 minutes.
Can you tell me what you think of this ?
Thanks
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org