Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many open files (os error 24) on macOS #1248

Open
nathany opened this issue Sep 2, 2023 · 7 comments
Open

Too many open files (os error 24) on macOS #1248

nathany opened this issue Sep 2, 2023 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@nathany
Copy link

nathany commented Sep 2, 2023

When running lychee README.md against this repository https://github.com/dariubs/GoBooks, I am seeing the following error on macOS 13.5.1, however these links are considered fine by GitHub Actions with Ubuntu.

✗ [ERR] https://github.com/thewhitetulip/web-dev-golang-anti-textbook | Failed: Network error: dns error: proto error: io error: Too many open files (os error 24)

It's happening on quite a few links.

Running against commit 1c71e7329e369b510afb806f484aa4e415b9aeb2 of https://github.com/dariubs/GoBooks with lychee installed via Homebrew.

❯ lychee --version
lychee 0.13.0

@nathany nathany changed the title Too many open files (os error 24) Too many open files (os error 24) on macOS Sep 2, 2023
@nathany
Copy link
Author

nathany commented Sep 2, 2023

Apologies, I didn't see an issue for it, but it's addressed in the README.

commit f2109a4

Still, kind've wonder if the default max concurrency should be lower, at least on macOS, to avoid this out-of-the-box issue.

@nathany nathany closed this as completed Sep 2, 2023
@mre mre reopened this Sep 3, 2023
@mre
Copy link
Member

mre commented Sep 3, 2023

Yeah, we should fix that. I will look at the repo to see what I can do.

@mre
Copy link
Member

mre commented Sep 3, 2023

Similar discussion: RustScan/RustScan#25

@nathany
Copy link
Author

nathany commented Sep 3, 2023

@mre Thanks. It is still occurring on main with that repo, with ~148 links to check.

Setting --max-concurrency 32 resolves it on macOS.

@mre
Copy link
Member

mre commented Jan 29, 2024

  • Try to use rlimit crate to detect resource limits and limit the number open files to that.

@mre mre added bug Something isn't working waiting-for-feedback help wanted Extra attention is needed and removed waiting-for-feedback labels Jan 29, 2024
@reagle
Copy link

reagle commented Mar 27, 2024

I just encountered this on:

| lychee 0.14.3
| macOS 14.3.1 23D60 arm64

@mre
Copy link
Member

mre commented Apr 3, 2024

I think rlimit is the way to go to fix this once and for all (famous last words).
In the meantime, your best bet is --max-concurrency, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants