Immediately after startup: accept4: too many open files

Hello *,

on a machine that was working OK, and no configuration changes made recently, I am seeing the following immediately (less then a minute) after start:

WARNING: Listen (BEP/tcp): Accepting connection: accept tcp [::]:22000: accept4: too many open files

su - syncuser -c ‘ulimit -aHS | grep open’ -s '/bin/bash’ open files (-n) 500000

cat /proc/$(pidof syncthing)/limits | grep open Max open files 4096

ls -lah /proc/$(pidof syncthing)/fd* | wc -l 261

(few moment later)

ls -lah /proc/$(pidof syncthing)/fd* | wc -l 8201

(few moment later)

ls -lah /proc/$(pidof syncthing)/fd* | wc -l 259

(few moment later)

ls -lah /proc/$(pidof syncthing)/fd* | wc -l 8201

… and so on, up and down between 200 and 8000

The only notable thing that happened recently was that machine had unclean shutdown and I had to remove CURRENT and LOCK files. Database was apparently repaired on first start.

Searching for similar errors did not come up with much…

Any suggestions very much appreciated

Thanks, Andrej

By default there are two syncthing processes, so $(pidof syncthing) isn’t deterministic. You want to look at the one of them with the higher PID (typically), and see what the open files actually are. Also, you didn’t mention what version you’re running.

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