-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
owncloud crashs external file system when several users download same large public link shared file, using object storage and 4 servers in the cluster #25892
Comments
This means that several PHP requests would need to be able to access the same temporarily downloaded file, which is tricky considering that there also needs to be some kind of lock / tracking to make sure subsequent requests wait for the first request to fully finish downloading the file. This comes closer to what I suggested here: #5225 On the other hand, I think that a temporary file shouldn't even be needed and the file should be streamable directly from the swift storage, which is discussed here: #5949 From what I see SWIFT stream download has already been implemented in 9.0 here #19002, so the question is why is it still creating temporary files in your specific environment ? |
@PVince81 Thanks for reply! I use object storage as the primary storage backend rather than files_external and enabled encryption, if SWIFT stream download also works in my situation? |
Looks like primary swift storage should also use streaming:
CC @butonic |
@PVince81 Thanks! If I want to cache some large file in web server, where can I modify in the source code? I mean every time a large file download request came, I can download the origin file from object storage and keep it on the web server for a period of time in case of someone else also want to download it, I can use redis to lock that file |
You can't do this easily without modifying/rewriting big parts of the code unfortunately. |
@PVince81 I rewrote fopen function and now file can be cached to local server, close this issue |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Steps to reproduce
2.
3.
Expected behaviour
only one temp cached file will be download on the server
Actual behaviour
10 files were downloaded from object storage, it means one download request will touch one php temp file on the webserver
Server configuration
Operating system: centos 7
Web server: apache
Database: mysql
PHP version: 5.4
ownCloud version: (see ownCloud admin page) 9.0.1
Updated from an older ownCloud or fresh install: fresh
Where did you install ownCloud from:
Signing status (ownCloud 9.0 and above):
List of activated apps:
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/... ceph object storage
Are you using encryption: yes/no yes
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... ldap
LDAP configuration (delete this part if not used)
Client configuration
Browser:
Operating system:
Logs
Web server error log
ownCloud log (data/owncloud.log)
Browser log
Hi OC team,
Can we cache only one file on the server when download same file? I found when several users download one same file in the public link, each request will make web server(4 servers in one cluster) download the file from object storage, so if there are 10 users downloading one same file at the same time, there would be 10 files on my 4 webservers, it will crash my backend object storage
need your help and advisor, thanks!
The text was updated successfully, but these errors were encountered: