You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disable caching for external storage (performance) #9701
Hi,
Is it possible to disable caching files for external, read-only storage?
For better understanding why anybody may need this, here is my usage scenario:
I have FreeNAS box with large volume used as file-server.
I wanted to provide the users with access to this share also through web browser (read-only is enough).
I installed OwnCloud as free BSD jail at FreeNAS and mounted FreeNAS storage as "External Storage".
Since I did that, almost any operation in owncloud takes very long. Worse - I often get "General error: 5 database is locked" error, which is making the service unavailable. Sometimes it is enough to wait a while, sometimes apache daemon restart is necessary. This happens often enough to consider this solution unusable.
I've noticed that SQLITE database used by owncloud has about 170 MB and oc_filecache has more then 500000 entries: probably all files from this external storage.
This led me to conclusion (maybe wrong), that it is sqlite operations on files cache that makes it so long, and that are indirectly causing lock condition.
Anyway - is it possible somehow to disable caching for selected storage? Or any other hint how to solve my problem?
We need to keep the file information in the database - this is one of the most basic principles within ownCloud.
Please note that sqlite is not the recommended database for that amount of data.
Do you have the possibility to use mysql or pg?
That was my first thought, but I could not find any migration procedure from sqlite to mysql for ownCloud v. 6 (only for 5).
Maybe I will try to setup it from scratch with mysql.
Looks like I have no other choice if caching is "one of the most basic principles within ownCloud".
Generally slow access is not such a big problem for me, but permanent database locks is KO.
Thanks for response.
Activity
DeepDiver1975 commentedon Jul 17, 2014
We need to keep the file information in the database - this is one of the most basic principles within ownCloud.
Please note that sqlite is not the recommended database for that amount of data.
Do you have the possibility to use mysql or pg?
macmacy commentedon Jul 17, 2014
That was my first thought, but I could not find any migration procedure from sqlite to mysql for ownCloud v. 6 (only for 5).
Maybe I will try to setup it from scratch with mysql.
Looks like I have no other choice if caching is "one of the most basic principles within ownCloud".
Generally slow access is not such a big problem for me, but permanent database locks is KO.
Thanks for response.
DeepDiver1975 commentedon Jul 17, 2014
This will be introduced with OC7
Unfortunate these database locks with sqlite can happen - especially in multi-user environments or in environments with a lot of data.
We are aware of this issue and we did the best we could do up to now - sorry