title: AppEngine+GCM: IOException: Could not fetch URL: https://android.googleapis.com/gcm/send
body: <p>I am using GCM in combination with Google AppEngine (Java).
  My service sends more than 10.000 messages every day. Almost every message is successfully sent to the receiver.
  But about every day, I get the following exception after sending a GCM message via AppEngine:</p>
  
  <pre><code>Uncaught exception from servlet
  java.io.IOException: Could not fetch URL: https://android.googleapis.com/gcm/send
  at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:137)
  at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:43)
  at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:417)
  at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:296)
  at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getResponseCode(URLFetchServiceStreamHandler.java:149)
  at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:362)
  at com.google.android.gcm.server.Sender.send(Sender.java:261)
  at de.alamos.firemergency.apager.gcm.ApagerServlet.sendDataToAndroid(ApagerServlet.java:282)
  at de.alamos.firemergency.apager.gcm.ApagerServlet.doPost(ApagerServlet.java:162)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
  ...
  </code></pre>
  
  <p>This error occurs at following line:</p>
  
  <pre><code>MulticastResult results = sender.send(message, tokens, 5);
  </code></pre>
  
  <p>Does anyone has an idea, what the problem could be?</p>
  
  <p>It is quite strange, becuase 99,999% of all messages will be sent. Only a few of them are throwing this exception.</p>