BITS upload doesn't work for large files
This repository was archived by the owner on Jul 24, 2021. It is now read-only.
This repository was archived by the owner on Jul 24, 2021. It is now read-only.
Description
Hello,
I've noticed, that uploading large files using the BITS protocol doesn't work correctly:
DEBUG:onedrive.api_v5:Uploading BITS fragment 105 / 107 (max-size: 48.83 MiB)
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: cid-17***censored***fd.users.storage.live.com
WARNING:requests.packages.urllib3.connectionpool:Connection pool is full, discarding connection: cid-17***censored***fd.users.storage.live.com
DEBUG:onedrive.api_v5:Uploading BITS fragment 106 / 107 (max-size: 48.83 MiB)
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: cid-17***censored***fd.users.storage.live.com
WARNING:requests.packages.urllib3.connectionpool:Connection pool is full, discarding connection: cid-17***censored***fd.users.storage.live.com
DEBUG:onedrive.api_v5:Uploading BITS fragment 107 / 107 (max-size: 48.83 MiB)
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: cid-17***censored***fd.users.storage.live.com
WARNING:requests.packages.urllib3.connectionpool:Connection pool is full, discarding connection: cid-17***censored***fd.users.storage.live.com
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: cid-17***censored***fd.users.storage.live.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /users/0x17***censored***fd/LiveFolders/a_very_big_file.tar.gz.enc HTTP/1.1" 401 0
DEBUG:onedrive.api_v5:Refreshing access_token
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): login.live.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /oauth20_token.srf HTTP/1.1" 200 1798
DEBUG:onedrive.conf:Updating configuration file ('/root/.lcrc')
DEBUG:requests.packages.urllib3.connectionpool:"POST /users/0x17***censored***fd/LiveFolders/a_very_big_file.tar.gz.enc HTTP/1.1" 500 0
Traceback (most recent call last):
File "/usr/local/bin/onedrive-cli", line 9, in <module>
load_entry_point('python-onedrive==14.11.22', 'console_scripts', 'onedrive-cli')()
File "/usr/local/lib/python2.7/dist-packages/python_onedrive-14.11.22-py2.7.egg/onedrive/cli_tool.py", line 329, in main
else: dst, xres = None, api.info(api.put_bits(optz.file, folder_path=dst))
File "/usr/local/lib/python2.7/dist-packages/python_onedrive-14.11.22-py2.7.egg/onedrive/api_v5.py", line 490, in put_bits
'BITS-Session-Id': bits_sid })
File "/usr/local/lib/python2.7/dist-packages/python_onedrive-14.11.22-py2.7.egg/onedrive/api_v5.py", line 325, in __call__
return self.request(api_url(), **request_kwz)
File "/usr/local/lib/python2.7/dist-packages/python_onedrive-14.11.22-py2.7.egg/onedrive/api_v5.py", line 149, in request
raise raise_for.get(code, ProtocolError)(code, message)
onedrive.api_v5.ProtocolError: (500, '500 Server Error: Internal Server Error')
end
I think it's because of an autentication timeout?
Greets pk910