-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
performance issue when deleting folder of user with many files #3021
Comments
Can you explain the steps a bit more? |
Hallo @nickvergessen , I tried it with both. Creating/Deleting on WEBUI is as discbribed above. Creating/Deleting with Client is nearly the same. The nextcloud.log shows immediately, that it is deleted. It is deleted from my local SSD but needs his time until it is removed from the server. PS: Accidentely closed this thread .. opened again. |
I think i have figured it out, but i don't know how to resolve it. I activated log_slow_queris and saw this when I wanted to delete the folder "New folder". The table "oc_filecache" had over 2.1 mio entries and has now also after a few minutes over 300.000 again. It seems that everything is stored in this table. Because I deleted every entry and also the shares disappeared and the size of the files are change from XY MB to "Pending .." after opening the folder it shows the size again. Deleting of the files is now fast again. But will become slow because the Table get spammed.
|
After one night of caching and nobody using the cloud the Table "oc_filecache" has again 2.1 mio entries. Should the cache not be emptied after n hours of not using a specific file/folder ? |
The When you get so many entries, please have a look which client is creating these |
Hi! We are currently running in a BETA Test with the cloud, so I can test and check everything - my cloud isn't productiv yet. Is their a solution ? I don't want to create several accounts and split the files to them only that the query gets faster. PS: If you don't understand why, I can explain in german, because my english isn't that good as you see ;-) |
@icewind1991 performance issue on deleting a folder when you have many files, something we can do here? |
Which statement is executed when I delete a file ? Because this works fast. A empty folder and an empty textfile on the same location are deleted at the same time. File disappeared immediately, folder took his time. File was deleted also on filesystem in the moment I deleted it on the WEB UI. Folder was on the Filesystem until it was removed from the UI. Is there a way the handle a folder like a file? |
Moved the Database to a SSD. Perfomance is the same .. Maybe I will do the workaround and split the files in to several storages of different users. |
@nickvergessen @icewind1991 |
The problem is, that a file can have multiple parent folders, so this would cause either an |
And just make the folder invisible before the Statement is executed? No one needs to know that the folder is still there. Why is the statement executed ? Because I need to know which files are in this folder or? Because when I delete a file, there isn't this statement. And generating a table, where every folder gets the fileid's from files under him? And when a file is in Folder /BLI/BLA/BLUB/BLO it will appear 4 Times. It would be a much bigger database, but maybe it would be faster? Sorry if I'm annoying .. |
Just want to second that handling many files (not only on deletion) is an issue with nextcloud. From my experience ist has impact on user experience and trust in the cloud. |
I've noticed, that every operation with any file from folder with thousands of files through webdav protocol generates thousands queries (one or 2 query for every file from that folder): I've created separate issue #8962 |
Can you test if this was fixed by #20716? |
Closing as this issue is very old. |
Steps to reproduce
Expected behaviour
Folder should be deleted immediately
Actual behaviour
Folder exists over several minutes until it gets deleted or it don't even get deleted
Server configuration
Operating system:
Centos 7.3.1611
Web server:
Apache 2.4.6
Database:
Mysql
PHP version:
7.0.14
Nextcloud version: (see Nextcloud admin page)
11.0
Updated from an older Nextcloud/ownCloud or fresh install:
10.0.2
Where did you install Nextcloud from:
Downloaded TAR-archive from website
Signing status:
Signing status
List of activated apps:
App list
The content of config/config.php:
Config report
Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no
Client configuration
Browser:
Chromium
Operating system:
Debian 8
Logs
Web server error log
Web server error log
``` No errors [Wed Jan 11 09:07:54.887290 2017] [mpm_prefork:notice] [pid 22986] AH00163: Apache/2.4.6 (CentOS) PHP/7.0.14 configured -- resuming normal operations [Wed Jan 11 09:07:54.887307 2017] [core:notice] [pid 22986] AH00094: Command line: '/sbin/httpd -D STATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid' ```Nextcloud log (data/nextcloud.log)
Nextcloud log
``` {"reqId":"WHXaFRf1NgSYKRgERHO25gAAAAA","remoteAddr":"10.10.11.135","app":"admin_audit","message":"File deleted: \"\/private\/home\/olaf\"","level":1,"time":"2017-01-11T07:09:09+00:00","method":"DELETE","url":"\/remote.php\/webdav\/private/home\/olaf","user":"julian,"version":"11.0.0.10"} ```Browser log
Browser log
``` Didn't find any useful stuff ```Additional notes
cron.php running via cronjob. Folder gets locked after "delete" when I check the REDIS-DB. I will update the post as soon i know more.
Also it seems that only one account (ACC A) who owns the folder has the problem. If I create a folder with USER A it gets this strange behavior. With USER B not. Also if User A shares a folder, USER B also isn't able to delete the folder. But if USER B creates the Folder, USER A can delete. So i assume something with the User is broke. But what? It is also only a guess - i only have two accounts. Mine and Admin who one ~1TB of files.
UPDATE 2017/01/12
Created a Folder and created 2000 txt-files in my cloud directory. Deleted it after and it got stuck by syncing 0 of 2000 files. After 3 to 5 minutes I "timed out" - but I didn't - i was deleted after the Error was shown.
The text was updated successfully, but these errors were encountered: