-
Notifications
You must be signed in to change notification settings - Fork 66
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
Sending Large Files #84
Comments
@solepixel The code above is supposed to send your file in chunks, eg. this creates a 320KiB chunk: new LimitStream($stream, $rangeSize, $offset); Perhaps the code above is suffering from a memory leak on some systems, I will need to stress-test it a bit more. Can you tell me the OS & PHP version you are using? |
I believe it is sending in chunks, however there is no way to break the chunks into multiple requests, it tries to send the entire file all in the same process, so generally we're hitting 30sec timeout issues. Tested on MacOS Catalina (10.15.4) and PHP 7.4.2 and PHP 7.3.9 as well as Ubuntu 14.04.6 with PHP 7.0.33 and PHP 7.4.6. |
@krizalys thanks for the sdk. Do not know where actually the issue is, either it belongs to OneDrive or upload utility. |
This issue is related to uploading larger files, such as 800MB and 1GB. The code I have for sending ALL files is the same:
During the
$upload->complete()
step, the entire file contents are retrieved, no matter what the file size. See:Do you have an example of how to utilize the
rangeSize
option in thestartUpload()
$args
to manually process the upload in chunks? Otherwise, do you have any suggestions? We continue to hit problems with timeouts, memory, and 503 Errors from OneDrive. It would be great to have a "status" returned during$upload->complete()
or maybe even something like$upload->getStatus()
, so I can close the request, and use the status to continue the upload on a new request. We've done something similar with Google Drive and Dropbox, but using the code above isn't quite cutting it for OneDrive. Thanks!The text was updated successfully, but these errors were encountered: