Too many open files V. 1.0.1

Hi, I read this thread, I waited some months till new version was released in the libreelec OS for the raspberry, but it doesn’t seem to be working.

My folders don’t synchronize, and I get this message:

    2019-03-03 09:02:15: Syncthing should not run as a privileged or system user. Please consider using a normal user account.

2019-03-03 09:02:16: Listen (BEP/tcp): Accepting connection: accept tcp [::]:22000: accept4: too many open files

2019-03-03 09:02:17: Listen (BEP/tcp): Accepting connection: accept tcp [::]:22000: accept4: too many open files

2019-03-03 09:02:19: Listen (BEP/tcp): Accepting connection: accept tcp [::]:22000: accept4: too many open files

What does ulimit -n say when run from a shell?

1 Like

It says: 1024

I am testing with just a folder with a few ringtones. Some months ago it worked like a charm with big folders.

Yeah that should probably be enough. I don’t know what you’re running into.

The limits reported by ulimit might not apply here if syncthing is started by systemd: https://wiki.archlinux.org/index.php/Limits.conf

1 Like

@calmh it might be worth to examine /proc/<pid>/limits on Unix platforms and add it to the log as this seems to be a frequent issue.

1 Like

No need for proc interaction, we already attempt to raise the soft limit to the hard limit and know the result of the operation (that function returns the new limit). We don’t specifically log anything about it, although we could do so and flag a warning if it’s scary low.

2 Likes

I think we should log it as the issue seems to arise every now and then: https://forum.syncthing.net/search?context=topic&context_id=12958&q=too%20many%20open%20files&skip_context=true

1 Like

Okay, I’ve thought it was too simple. Android virtual machine with Android 9 has 32768 ulimit. My physical device (Xiaomi mi8) has 1024 as ulimit. Android is simply never uniform …

I guess we can agree on that one :smile:

1 Like

Just for writing this to the paper: I’ve updated Xiaomi miui from 10.0.x to 10.2.3 (Android 8.1 to 9) and my open file limit changed from 1024 to 32768.

And this problem (if you had it) disappeared?

@cromoduro I’ve just added the info about the file limit to the app so if anyone has problems it’s easier to investigate. My sync was working fine with both ulimits.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.