einaregilsson / MyLife

MyLife: A single-user OhLife alternative
MIT License
26 stars 14 forks source link

Backup Dropbox failing? Even on v2 api? #14

Closed jonchui closed 4 years ago

jonchui commented 5 years ago

I’m getting this error in my emails:

Failed to backup posts and images to dropbox: Traceback (most recent call  
last):

File "/base/data/home/apps/s~jonchuislife/20171011t222458.404746098147759290/handlers/dropbox.py",  
line 39, in get
     result = self.put_file(settings.dropbox_access_token, 'MyLife.txt',  
post_text.getvalue().encode('utf-8'))

File "/base/data/home/apps/s~jonchuislife/20171011t222458.404746098147759290/handlers/dropbox.py",  
line 142, in put_file
     headers=headers

File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/urlfetch.py",  
line 293, in fetch
     return rpc.get_result()

File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py",  
line 615, in get_result
     return self.__get_result_hook(self)

File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/urlfetch.py",  
line 433, in _get_fetch_result
     'Connection closed unexpectedly by server at URL: ' + url)
ConnectionClosedError: Connection closed unexpectedly by server at URL:  
https://content.dropboxapi.com/2/files/upload
einaregilsson commented 5 years ago

Is this happening every night? I've gotten this message a few times, but like maybe 10 times in 2 years or something.

jonchui commented 5 years ago

It used to be infrequent, but now is much more frequent, i have 73.7% of my 15 GB dropbox full, so i don't think it's a space issue

here's a search:

image

jonchui commented 5 years ago

Upon further investigation, when i run to the url [domain]/backup/dropbox to run the backup, it seems to work, and this appears on the screen:

Backing up 251 posts to Dropbox
Backed up posts. Revision: c82edaa2e4
Fetching Dropbox file list
Got 81 files from Dropbox
Fetching images...
Total images in MyLife: 80

Files not backed up: 

Files marked as backed up, but not in Dropbox: 

Found 0 images that need to be backed up in Dropbox
Finished backup successfully
einaregilsson commented 5 years ago

That is pretty frequent, but I've never been able to reproduce these errors. I guess it must be a Dropbox thing, I searched for similar errors and all I found was some forum post where a Dropbox employee told someone to just retry in this case since errors like that could always happen. I should probably add 1 or 2 retries before sending the error message at some point.

einaregilsson commented 4 years ago

Closing this, have gotten no further reports.