xybu / onedrive-d-old

Microsoft OneDrive client on Linux.
http://xybu.me/projects/onedrive-d/
GNU Lesser General Public License v3.0
819 stars 142 forks source link

OneDrive server returns server_internal_error #88

Closed kumarharsh closed 9 years ago

kumarharsh commented 10 years ago

This one time, I was running the daemon with

 ./onedrive_d/main.py --no-gui

and I deleted a file from my online OneDrive, and the daemon stopped the syncing. The error thrown was:

Exception in thread syncer:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/home/me/repos/onedrive-d/onedrive_d/daemon.py", line 695, in run
    self.merge_dir(entry)
  File "/home/me/repos/onedrive-d/onedrive_d/daemon.py", line 535, in merge_dir
    all_remote_items = self.api.list_entries(remote_path)
  File "/home/me/repos/onedrive-d/onedrive_d/live_api.py", line 197, in list_entries
    return self.parse_response(r, ProtocolError)['data']
  File "/home/me/repos/onedrive-d/onedrive_d/live_api.py", line 67, in parse_response
    raise error(ret)
live_api.ProtocolError: 'server_internal_error: An unexpected processing error occurred. Please contact Microsoft.'
xybu commented 10 years ago

Should we contact Microsoft? lol

But let me try reproducing the problem later (later may mean winter break... too much course stuff pending recently...).

yorickdewid commented 10 years ago

I'll try the reproduce the error today, but from what I can remember it almost always goes wrong in either the get() or get_access_token().

Update: Ran the daemon for the whole day and both errors occurred at some point. The Internal Server Error is always caused by the merge_dir() (even when no directories are merged).

For the Connection reset by peer, I noticed MS Exchange does the same thing if to much traffic flows over the same connection. I've started to suspect that all Microsoft servers use some sort of firewall rule to block the connection if to much traffic is requested. I'm unable to find any kind of information or documentation about it.

@xybu Just had the winter(?) break, you mean Christmas? :P

xybu commented 10 years ago

From #42 there seem two related params: MaxClientMBTransferredPerDay = 537600 MaxClientRequestsPerDay = 2500000 But they seem hard to reach.

yorickdewid commented 10 years ago

It is definitely not per day as the daemon continues where it dropped out after a restart. After the SkyDrive to OneDrive update some settings have changed and I've looked into them again. Possible parameters related to these issues could be:

# Policy Settings
NumConcurrentDownloads = 1
NumberOfConcurrentUploads = 3

# User Settings
maxNumRequests = 10

PS: I do quite well with Python :) Just let me know if I can be of any help.

xybu commented 9 years ago

Don't know how much BITS API and other stuff will help solve issues in this thread. But most "server_internal_error"s happen when you upload large (just a few MiB) files. Could you check how well future branch (ver > 1.0) works for you?

yorickdewid commented 9 years ago

I'll try this afternoon on Debian