title: How do I solve "Reached the maximum number of URI tags for http.client.requests" warning?
body: <p>I receive this warning on my app.  I am reading rfidtags from about 30 readers at the same time.  Each time a tag comes in I am hitting the database to see if its in there. I have a rest api that I am using.  So I use a rest template to hit the rest api. Any ideas on how to solve this?  Thanks!</p>
  
  <p>Here's some of my code:</p>
  
  <pre><code>private void vehicleRequests(List&lt;Maybevehicle&gt; vehicles){
      //process list of unique tags to see if they are in the database and linked to a vehicle
      List&lt;Maybevehicle&gt; foundMaybeVehs= new ArrayList&lt;&gt;();
      List&lt;Maybevehicle&gt; notFound=new ArrayList&lt;&gt;();
       if(!vehicles.isEmpty()){
               for (Maybevehicle v: vehicles){
                  Future&lt;Maybevehicle&gt; r=aService.batchVehTags(v);
  
                  try{
                      Maybevehicle m=r.get(2000, TimeUnit.SECONDS);
                      if(r.isDone()){
                          if (!(m.getB().getVin().equals("notindb"))){
                              foundMaybeVehs.add(m);
                          }
                          }
                      }
                  }catch(InterruptedException | ExecutionException | TimeoutException e){
  
                  }
               }
  
                if(!foundMaybeVehs.isEmpty()){
                   addLocation(foundMaybeVehs);
               }
       }else{
           log.info("no vehicles to check.");
       }
  
  }       
  
  
  @Override
  public Future&lt;Maybevehicle&gt; batchVehTags(Maybevehicle v) {
      Future&lt;Maybevehicle&gt; future=null;
           try{
                   SimpleTaskMaybeveh task=new SimpleTaskMaybeveh(v, appRestTemplate);
                    future=dbService.submit(task);
  
               }catch(Exception e){
                      e.printStackTrace();
                   }
  
              return future;
          }
  
  
  
  
  }
  
  public class SimpleTaskMaybeveh implements Callable&lt;Maybevehicle&gt;{
  
  private RestTemplate appRestTemplate;
  private Maybevehicle veh;
  
  public SimpleTaskMaybeveh(Maybevehicle veh, RestTemplate appRestTemplate){
      this.veh=veh;
      this.appRestTemplate=appRestTemplate;
  }
  
  @Override
  public Maybevehicle call(){
    String url="http://url/"+veh.getB().getRfidtag();
      String authString= "";
      byte[] encodedAuth= Base64.encodeBase64(authString.getBytes(Charset.forName("US-ASCII")));
      String authHeader="Basic "+new String(encodedAuth);
      HttpHeaders headers = new HttpHeaders();
      headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
      headers.set("Authorization", authHeader);
      HttpEntity&lt;Bmwvehiclemain&gt; requestEntity=new HttpEntity &lt;Bmwvehiclemain&gt;(headers);
      ResponseEntity&lt;Bmwvehiclemain&gt; results=appRestTemplate.exchange(url, HttpMethod.GET, requestEntity, Bmwvehiclemain.class);
      try{
          Bmwvehiclemain n=results.getBody();
          Maybevehicle d=new Maybevehicle(n,veh.getNewtaglocation());
          return d;
      }catch(Exception e){
          Maybevehicle notveh=new Maybevehicle("notindb");
          return notveh;
      }
  }
  
  }
  </code></pre>