我们经历了以下错误模式:
2.除
com.google.apphosting.api.ApiProxy$CancelledException: API调用urlfetch.Fetch()被取消,因为线程在等待并发API调用时被中断。嵌套异常是java.io.IOException: com.google.apphosting.api.ApiProxy$CancelledException: API调用urlfetch.Fetch()是因为线程在等待并发API调用时被中断。
3.接下来几毫秒内进入GAE应用程序的后续请求在相同的Error code 104
中失败
RestTemplate restTemplate = new RestTemplate(getClientHttpRequestFactory());
try {
URI uri = new URI("https://sample/" + sessionId);
sessionInfo = restTemplate.getForObject(uri, SessionResponse.class); } catch (Exception e) {
System.out.println(e.getMessage());
}
我将restTemplate的超时设置为50秒,这段代码位于拦截器中,每个请求都将迁移到这个代码块并执行
我正在使用javax.servlet.Filter
在那里迁移请求,我得到了第二个异常
如有任何解决方案,我们将不胜感激,
Appengine-web.xml文件
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties" />
</system-properties>
<url-stream-handler>urlfetch</url-stream-handler>
<warmup-requests-enabled>false</warmup-requests-enabled>
</appengine-web-app>
https://stackoverflow.com/questions/59765017
复制相似问题