Uploaded image for project: 'HttpComponents HttpAsyncClient'
  1. HttpComponents HttpAsyncClient
  2. HTTPASYNC-35

Some requests never make it to the callbacks function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              herveeichwald Herve Eichwald
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: