From f2109a41a7b0ab404845d105729dc8a434b61f1c Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 2 Jan 2022 14:21:12 +0100 Subject: [PATCH] Mention workaround for too many file handles Add information on how to handle too many open file handles in troubleshooting guide --- TROUBLESHOOTING.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index ca47c85..27154f6 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -17,6 +17,22 @@ use a GitHub personal access token to circumvent this. For more details, see ["GitHub token" section in README.md](https://github.com/lycheeverse/lychee#github-token). +## Too Many Open Files + +The number of concurrent network requests (`MAX_CONCURRENCY`) is set to 128 by default. +Every network request maps to an open socket, which is represented as a file on UNIX systems. +If you see error messages like "error trying to connect: tcp open error: Too +many open files (os error 24)" then you ran out of file handles. + +You have two options: + +1. Lower the concurrency by setting `--max-concurrency` to something more + conservative like 32. This works, but it also comes with a performance + penalty. +2. Increase the number of maximum file handles. See instructions + [here](https://wilsonmar.github.io/maximum-limits/) or + [here](https://synthomat.de/blog/2020/01/increasing-the-file-descriptor-limit-on-macos/). + ## Unexpected Status Codes Some websites don't respond with a `200` (OK) status code. \