title: Google App Engine time out?
body: <p>In a Google App Engine app I used the following lines to read a page from a site :</p>
  
  <pre><code>  String Url="http://...",line,Result="";
  
    URL url=new URL(Url+"?r="+System.currentTimeMillis());
    BufferedReader reader=new BufferedReader(new InputStreamReader(url.openStream()));
  
    while ((line=reader.readLine())!=null) { Result+=line+"\n"; }
    reader.close();
  </code></pre>
  
  <p>But I got the following error :</p>
  
  <pre><code>Uncaught exception from servlet
  com.google.apphosting.api.DeadlineExceededException: This request (f5e2889605d27d42) started at 2011/09/07 03:20:41.458 UTC and was still executing at 2011/09/07 03:21:30.888 UTC.
      at sun.misc.Unsafe.park(Native Method)
      at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1037)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326)
      at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:276)
      at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:82)
      at com.google.appengine.tools.development.TimedFuture.get(TimedFuture.java:55)
      at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:69)
      at com.google.apphosting.runtime.ApiProxyImpl.doSyncCall(ApiProxyImpl.java:177)
      at com.google.apphosting.runtime.ApiProxyImpl.access$000(ApiProxyImpl.java:56)
      at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:150)
      at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
  </code></pre>
  
  <p>Seems it took longer than it would like to wait, what can I do if that site is slow ?</p>