Skip to content

Folder Size does not get calculated #13876

Closed

Description

@mmattel

Ubuntu 14.04, nginx, MySQL, PHP5.5.9, ownCloud git/Master 8.0.2

I created a new dev instance and added one SMB mount point (files external) successfully.

Problem:
when I go to the Files App, the size of the added external mount point never gets calculated, even not after a day of waiting time.
Logout/relogin, rebooting ect does not change the status. I always get "Ausstehend".

I can access the folder and its contents, I even can use gallery, but the Files App keeps staying on "Ausstehend".

There are no log entries

Info. This worked before on 8.x and works on 7.0.4 stable

Activity

  1. PVince81 commented on Feb 4, 2015

    @PVince81
    Contributor

    What if you navigate into that SMB folder and sync it ?
    From what I remember it only starts scanning the SMB folder once it is accessed at least once.

  2. added this to the milestone on Feb 4, 2015
  3. mmattel commented on Feb 4, 2015

    @mmattel
    ContributorAuthor

    Here are some tests / things I did:

    1. I added the SMB share and watched with htop the cpu load which was immediately high after leaving the admin page, like it would start to scan.
    2. changing to the files app showed "Ausstehend" but it never finished. Remember, I waited for a full day.
    3. As suggested I navigated thru the new folder. When I came back some time later, the folder size was shown.
    4. To do a comparison, I mounted a smb share to a local ubuntu folder and mounted this folder with owncloud/local. Again, It showd "Ausstehend", but shortly after, without diving thru the folder content like before I got the size presented.
    5. I retested it with a different smb share in the same way as above, but the result was the same.

    What I have seen is, that the performance of scanning local (but mounted to smb) compared to mount smb by owncloud was significant different where local was much faster. 210GB local was done counted in seconds while the same mounted as smb took about many many minutes. Maybe the scanning speed difference can cause misthinking that it will never finish. And when you log off it seems that the size evaluation gets interrupted. A user then thinks it gets never done...

    My interpretation:

    • it is not necessary to dive into the mountpoints first to get the size evaluation (scanning?) started.
    • it is a huge difference for the size evaluation (scanning?) if you mount local or smb.
    • size evaluation (scanning?) never gets finished if the user who creates the mountpoint logges off before the run passes at least once.
  4. PVince81 commented on Feb 4, 2015

    @PVince81
    Contributor

    A few points:

    • mounting SMB on filesystem level will always be much faster than the PHP adapter/code that ownCloud uses (which wraps around the "smbclient" command line). If you can use FS level mount in your use case/setup, please do so
    • scanning a huge folder might take a lot of time until it can tell the size. There is a risk that the PHP process runs into a timeout, so it might not continue running
    • depending on your setup, the PHP process of the scanner might get killed if the connection is closed (when using php-fpm). From my experience, when using mod_php, the PHP process continues running even if the network connection is closed
  5. mmattel commented on Feb 7, 2015

    @mmattel
    ContributorAuthor

    ad 1:
    local vs non local: this is what I also expected, but not that big difference...
    I will do a short notice in the documentation about.

    ad 2:
    oohhh. not good. how can that prevented? ownCloud can not predict any size/quantity of the share mounted.

    ad 3:
    I am using php-fpm and that would explain why after logging out scanning never finishes.
    question: how is that managed when there is a cron job running? a cron job is, as far I understand it, assigned to a user, but can run independent if the user is logged on or not. if this is the case, why can´t the scanner run like a cron job?

    from an admin/user point of view, you mount an external storage, but up to the point the scanner finishes and shows a result, you have no feedback where the scanning process is.

  6. mmattel commented on Feb 7, 2015

    @mmattel
    ContributorAuthor

    I just have seen that things could change when #10673 (New SMB Storage Backend) gets merged, at least from the point of scanning time. this would bring local and smb processing time closer (item 1 above)

  7. PVince81 commented on Feb 9, 2015

    @PVince81
    Contributor

    for point 2) you cannot prevent PHP timeouts. That's how PHP works unfortunately. You could increase the timeout to bigger values.
    In the future we will look into making long running operations be run as cron jobs or async tasks.
    There are quite a few challenges regarding the background job approach (and a bunch of code to be rewritten)

    for 3) I believe that cron jobs are run on the command line and might have different timeout values, or no timeout at all. I believe they might not even fall under php-fpm stuff since they don't go through Apache/Nginx.

  8. modified the milestones: , on Feb 27, 2015
  9. ghost added this to the milestone on May 27, 2015
  10. ghost removed this from the milestone on May 27, 2015
  11. ghost added this to the milestone on Sep 21, 2015
  12. 12 remaining items

  13. PVince81 commented on Mar 21, 2016

    @PVince81
    Contributor

    I tried manually inserting a root entry with size -1, then the background scan did its job.

  14. icewind1991 commented on Mar 24, 2016

    @icewind1991
    Contributor

    This seems to be fixed with the 9.0 "background scanner in cron"

    • added a new external storage
    • checked that it's size was unknown in the web ui
    • ran cron
    • checked that the size in the webui was fixed
  15. PVince81 commented on Mar 24, 2016

    @PVince81
    Contributor

    @icewind1991 please read my comments #13876 (comment)

  16. PVince81 commented on Mar 24, 2016

    @PVince81
    Contributor

    Maybe remove the step "checked that size was unknown" to avoid triggering implicit scan through the web UI. Maybe create the ext storage on the CLI.

  17. icewind1991 commented on Mar 24, 2016

    @icewind1991
    Contributor

    ok, can reproduce by removing all cache entries for the storage and than running the background scan

    fix is here #23561

  18. ghost added this to the milestone on Apr 11, 2016
  19. ghost removed this from the 9.0.1 milestone on Apr 11, 2016
  20. ghost closed this as completedin #23561on Apr 14, 2016
  21. modified the milestones: , on May 4, 2016
  22. lock commented on Aug 4, 2019

    @lock

    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.

  23. locked as resolved and limited conversation to collaborators on Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions