Too Many Open Files on Syncthing 1.5

OS: raspian HW: RPi4 4GB

[start] 20:04:33 INFO: syncthing v1.5.0 "Fermium Flea" (go1.13.10 linux-arm) 2020-04-21 20:45:03 UTC
[L6CNM] 20:04:39 INFO: My ID: xxxxx
[L6CNM] 20:04:40 INFO: Single thread SHA256 performance is 44 MB/s using minio/sha256-simd (43 MB/s using crypto/sha256).
[L6CNM] 20:04:40 VERBOSE: Starting up (/home/pi/.config/syncthing)
[L6CNM] 20:04:40 INFO: Hashing performance is 40.29 MB/s
[L6CNM] 20:04:40 INFO: Migrating database to schema version 9...
[L6CNM] 20:23:58 WARNING: Database schema: open /home/pi/.config/syncthing/index-v0.14.0.db/114168.ldb: too many open files
[monitor] 20:23:58 INFO: Syncthing exited: exit status 1
[start] 20:23:59 INFO: syncthing v1.5.0 "Fermium Flea" (go1.13.10 linux-arm) 2020-04-21 20:45:03 UTC
[L6CNM] 20:24:06 INFO: My ID: xxxx
[L6CNM] 20:24:07 INFO: Single thread SHA256 performance is 44 MB/s using minio/sha256-simd (44 MB/s using crypto/sha256).
[L6CNM] 20:24:07 VERBOSE: Starting up (/home/pi/.config/syncthing)
[L6CNM] 20:24:08 INFO: Hashing performance is 41.06 MB/s
[L6CNM] 20:24:08 INFO: Migrating database to schema version 9...

Syncthing 1.5 boot loops at this point.

what can i do? :wink:

Increase file limit on the operating system

my limit is “unlimited” :-/

1 Like

What’s the output of ulimit -a?

1 Like
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 29184
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 95
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 29184
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

thank you for your time, all of you :wink:

I guess you have noticed this already.

1 Like

and what do i have to do now? ( i am a linux/ raspi noob :wink: )

as root:

sysctl -w fs.file-max=500000

vi /etc/sysctl.conf

add this line:


1 Like

I think if you google “linux how to increase open files” you’ll find plenty of answers.

1 Like

now its migrating since one hour… without any error yet…

fingers crossed :wink:

any idea about how long it could last? the migration? :wink: or any option to see a progress percentage?

Sadly no. This should be quick on a device with reasonable storage speeds and reasonable CPU, so on a slower device/slower storage/more data it will take longer.

okay, chears mate :wink:

any idea where the error could come from? syncthing worked nice, and suddenly the problem accured… the gui was not working anmore… it was before the uptdate to 1.5 already stoped working

i also never just cut the raspi power… i always very kindly shotdown syncthing then shutdown the raspi… :wink:

What error are you talking about?

If it’s the error in the original post fails to migrate the database.

The database needs to be migrated because syncthing updated to new version.

okay then i do not know what was the error at the beginning… i was suddenly not able to connect to the GUI (even waiting 2 days did not help)

then my friend got the idea, lets upgrade… i did… now i am stuck here :wink:

it is still migrading…

the TOP in the other console window says, syncthing CPU load only 20%… i never had this low synthingCPU usage :wink:

You might not be able to connect to the web ui while the migration is happening. If the migration is done, check the logs as it might be crashing.

1 Like

i understand that the gui is not reachable during migration :wink:

but the GUI not reachable (see the screenshot) was before my “too many files” error, that i am talking here. ( i dont know what caused it , but since you say: the migration is because of the upgrade to 1.5, which i only did by hand, by command line, after i had no idea what made my gui stuck, we cannot know what was the problem at the beginning, right? :wink: )

right now, finally, its working again…


Well if you are getting that error in the gui, you should check the logs, as it’s most likely crashing.

will do it in future :wink:

right now its working BUT files do appear in places where they never have been :frowning:

and at the other syncthing end, it shows those files as different files now :frowning: i get out of sync :frowning:

lets see what it does after a few more hours and what i have to do by hand :frowning: hope nothing gets missing of my files :wink:

by the way, here is my log, from this time, RASPI side… ( on the other side is my Synology )

Log Syncthing Raspi.txt (33.0 KB)