Skip to content

[Linux] File Watcher: Client does not error if inotify watches are exhausted #4107

Closed

Description

@mscke

Hi guys,

I've the fowlling problem my onwncloudClient on CentOS7 2.0.2 did not detect local changes on my filesystem. it's importent I sync over 200 000 files and 27000 Folders. I've found a solution. For the default settings of notifiyd is it not enough. I have these increased significantly now it is running smoothly again.
Unfortunately I can not say how many watches ownCloud actually needed. I took the number of directories plus the default value, but that is just a guess.

How can I calculate the notifyd max_user_watches for owncloudclient.
My system changes:

folders: 27176
defautl value: 8192

to test on a running system
echo 30368 > /proc/sys/fs/inotify/max_user_watches

to set in default after restart
vim /etc/sysctl.conf
fs.inotify.max_user_watches=30368


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

  1. changed the title [-]Owncloud Client 2.0.2 Centos7 local changes[/-] [+]Client does not error if inotify watches are exhausted[/+] on Nov 10, 2015
  2. danimo commented on Nov 10, 2015

    @danimo
    Contributor

    We should not silently discard errors when setting up watches, but proactively offer to fix the offending parameters.

  3. changed the title [-]Client does not error if inotify watches are exhausted[/-] [+][Linux] Client does not error if inotify watches are exhausted[/+] on Nov 10, 2015
  4. added this to the milestone on Nov 10, 2015
  5. guruz commented on Jan 4, 2016

    @guruz
    Contributor

    @danimo has some WiP code for this.

  6. danimo commented on Jan 6, 2016

    @danimo
    Contributor

    Workaround: Install a file called "100-owncloud-inotify.conf" in the packages. It should install to /etc/sysctl.d/ and contain the following line:

    fs.inotify.max_user_watches = 524288

    If someone hits that limit, there's not much we can do anyway.

    @dragotin, @jnweiger please add that do the packages.

  7. assigned and unassigned on Jan 6, 2016
  8. dragotin commented on Jan 8, 2016

    @dragotin
    Contributor

    @danimo are you sure that is across all our supported platforms? my openSUSE TW has it tough.

  9. added this to the milestone on Feb 11, 2016
  10. 14 remaining items

  11. reopened this on May 21, 2016
  12. modified the milestones: 2.3.0, 2.2.1 on May 27, 2016
  13. rldleblanc commented on Jun 9, 2016

    @rldleblanc

    I rebuilt 2.2.1 the same way as before and 100-owncloud-inotify.conf is still not in the Debian tarballs. In addition, now there is another 2 missing patch that I'll create an issue for (:sigh:). Why is '/usr/src/packages/SOURCES' even hard coded in debian/rules? This is not a good idea as users may not have the ability to write there.

  14. jnweiger commented on Jun 29, 2016

    @jnweiger
    Contributor

    @rldleblanc hardcoded /usr/src/packages/SOURCE was an ugly hack, where series files failed for unknown reason. It is fixed in 2.2.3

    I cannot find /etc/sysconf.d on any system. It should be be /etc/sysctl.d/ everywhere, not just on RPM systems. owncloud/administration#87

  15. crrodriguez commented on Aug 18, 2016

    @crrodriguez

    It is my opinion that this problem should be documented ..If you do change the global max_user_watches.. you are putting user's systems at risk nice D.o.S attack..that's why there is a low fixed size limit in the first place.. 524288 watches will allow any app (not just the owncloud client.. to use at least 512 MB of kernel memory...(if all watches are used of course)

  16. removed this from the 2.3.0 milestone on Aug 24, 2016
  17. added
    p3-medium
    and removed on May 3, 2018
  18. dragotin commented on Aug 19, 2021

    @dragotin
    Contributor

    There is a warning. Closing this as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions