title: Google Drive upload error : "I/O error during system call, Software caused connection abort"
body: <p>I have developed an Android application using which the user can upload large files (~1 to 2 GB in size) to his/her <strong>Google Drive account</strong>.</p>
  
  <p>I am using the <a href="https://developers.google.com/drive/v3/web/quickstart/android" rel="noreferrer">Google Drive Rest API</a> for Android. <strong>Sometimes</strong>, the upload operation fails with following exception:</p>
  
  <pre><code>javax.net.ssl.SSLException: Read error: ssl=0xcfe9ee80: I/O error during system call, Software caused connection abort
      at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
      at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:758)
      at com.android.okhttp.okio.Okio$2.read(Okio.java:141)
      at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:211)
      at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:316)
      at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:310)
      at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:206)
      at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:239)
      at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:104)
      at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:1156)
      at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:976)
      at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:509)
      at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:438)
      at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:567)
      at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
      at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
      at com.google.api.client.http.javanet.NetHttpResponse.&lt;init&gt;(NetHttpResponse.java:37)
      at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:94)
      at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:981)
      at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequestWithoutGZip(MediaHttpUploader.java:545)
      at com.google.api.client.googleapis.media.MediaHttpUploader.resumableUpload(MediaHttpUploader.java:417)
      at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:336)
      at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:427)
      at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
      at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
  </code></pre>
  
  <p>I have following questions:</p>
  
  <ol>
  <li>What are the reasons for such error?</li>
  <li>Is this the issue related to network speed?</li>
  <li>Is this is the problem with Google Drive API? If yes, how to avoid this error?</li>
  </ol>
  
  <p>I testing the app with <strong>Android 7.0</strong>.</p>
  
  <p>I would appreciate any suggestions and thoughts on this topic. Thank you.</p>