|  | @@ -20,6 +20,7 @@ import java.util.Map;
 | 
	
		
			
				|  |  |  import java.util.concurrent.ExecutionException;
 | 
	
		
			
				|  |  |  import java.util.concurrent.ExecutorService;
 | 
	
		
			
				|  |  |  import java.util.concurrent.Future;
 | 
	
		
			
				|  |  | +import java.util.concurrent.TimeUnit;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  public class PAIScorerV2 extends AbstractScorer {
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -87,7 +88,7 @@ public class PAIScorerV2 extends AbstractScorer {
 | 
	
		
			
				|  |  |          long startTime = System.currentTimeMillis();
 | 
	
		
			
				|  |  |          PAIModelV2 model = PAIModelV2.getModel();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        final int batchSize = 500;
 | 
	
		
			
				|  |  | +        final int batchSize = 300;
 | 
	
		
			
				|  |  |          List<List<AdRankItem>> batches = new ArrayList<>();
 | 
	
		
			
				|  |  |          for (int i = 0; i < items.size(); i += batchSize) {
 | 
	
		
			
				|  |  |              batches.add(new ArrayList<>(items.subList(i, Math.min(i + batchSize, items.size()))));
 | 
	
	
		
			
				|  | @@ -111,7 +112,7 @@ public class PAIScorerV2 extends AbstractScorer {
 | 
	
		
			
				|  |  |          List<AdRankItem> merged = new ArrayList<>();
 | 
	
		
			
				|  |  |          for (Future<List<AdRankItem>> future : futures) {
 | 
	
		
			
				|  |  |              try {
 | 
	
		
			
				|  |  | -                merged.addAll(future.get());
 | 
	
		
			
				|  |  | +                merged.addAll(future.get(400, TimeUnit.MILLISECONDS));
 | 
	
		
			
				|  |  |              } catch (Exception e) {
 | 
	
		
			
				|  |  |                  LOGGER.error("Execution error in batch", e);
 | 
	
		
			
				|  |  |              }
 |