Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stability fixes #217

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Stability fixes #217

wants to merge 3 commits into from

Conversation

visadb
Copy link

@visadb visadb commented Nov 26, 2013

These patches fix two major stability issues:

  1. hang if HTTP 500 is received when uploading a file and
  2. crash if invalid XML is received when uploading a file.

Without these patches, I was able to upload only around 5-50 files before grive hangs or crashes. With these patches I was able to upload around 20,000 files (20 gigs) before grive crashes or goes into an eternal loop.

Visa Putkinen added 3 commits November 27, 2013 00:17
This is sometimes necessary to prevent too frequent requests.
When an uploading PUT request got a HTTP 500 as reponse, grive hanged
forever inside libcurl. This was because the File parameter was not
rewound to 0 position on retry. The XmlResponse had to be cleared as
well.

Rewinding the File and clearing the XmlResponse were not enough to fix
the problem, because when retrying after 500, HTTP 410 Gone or 412
Precondition failed is often received, and CheckHttpResponse would throw
an exception that crashes grive. Therefore, I implemented a retry logic
to Resource::Upload that retries the whole upload transaction if 410 or
412 was received.
Sometimes the Google Drive API sends malformed XML which crashes grive.
This patch adds a simple try-catch to Resource::Upload that retries the
upload if an XML exception is thrown from AuthAgent::Put.
@estomagado estomagado mentioned this pull request Dec 13, 2013
@midenok
Copy link

midenok commented May 20, 2014

What was the crashes and endless loops after 20k files? Can you catch stacktraces of them?

@visadb
Copy link
Author

visadb commented May 26, 2014

I did not debug the crashes further because I bought Insync to replace grive. So setting things up for stacktrace catching would be too much work at this point, sorry.

AquariusPower pushed a commit to AquariusPower/grive that referenced this pull request Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants