简体   繁体   中英

google app engine for java- repeatedly getting timeout error when using java.net- does this mean I have to shift away from gae?

I am developing a web application on Google App Engine for Java... In this web app, I am calling an API which does some computation and returns data to my application in JSON format... The problem is that all the time there is a timeout error.

As per GAE for JAva docs, we cannot explicitly set the timeout to a user desired value when using java.net...Does this mean that I cannot code my application on Google App Engine? Because the particular API call that is giving timeout error repeatedly, is central to the application that I am working on... I just cannot create the application excluding this specific API call (that is giving timeout).

Is there some way to resolve this? Or do I have to shift away from Google App Engine(for this app at least...)?

Have you tried using the low-level API instead of java.net? Call setDeadline() on FetchOptions , passing in seconds as a double, or use the equivalent FetchOption.Builder method.

将代码放在后端: http : //code.google.com/appengine/docs/java/backends/overview.html这不会超时。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM