-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bot failing with an error Could not run: Error: EMFILE: too many open files, open #144
Comments
Could be that the project is too big 😬 |
Heard it might be from some |
We download the repo as a zip, so would only affect you if you had |
Is there any solution to this problem? |
I download the repo zip and extracting reveals 2395 files |
One question I have is - This does pass on the next run if I select "Re-run", The error is intermittent. If it's related only because of the project being large then it should fail in all cases? Are there any other ways we can improve to fix it? |
I've just restarted the linter-bot ~15 times on a single PR and it fails to complete with that same error |
After somewhere between 30 & 60 triggers of re-run for 3 PRs I've not been able to get the bot to pass these PRs, as such we're now overriding the linter-bot when necessary to merge these PRs |
The failures seem inconsistent in their cause. As mentioned if project file count was higher than the limit, we would have HM-Linter fail on all instances. I don't know much about Lambda (or maybe a related cache) but does it persist data across instances/runs, which could lead to the count being higher as previous runs still have files laying about? Is it possible to get the output of the log events mentioned in the description and dig further? |
@rmccue it seems HM Linter is using the native |
Copying in the related log file entry from cloudwatch:
|
It doesn't, but I'm not sure if it'll fix it. graceful-fs' approach is to wait to retry opening when it receives an EMFILE, but not all files are opened by Node, so I suspect this might just end up waiting forever. We can try it, but I wouldn't be betting on it personally. |
Yeah, I quickly whipped up #148 to try graceful-fs, I've not tried testing locally yet, the instructions for testing locally here seem straight forward but replicating this issue locally I think will be difficult. |
@ntwb des that mean that running HM Linter locally on your project does not run into this issue? 🤔 |
@tfrommen Correct, I've not been able to reproduce the issue locally, and it's only intermittent on the project |
Your |
Naive suggestion incoming: Is it possible to only pass the files within the PR to be linted in an attempt to reduce the file count? |
@tareiking It might be; see #149 - not explicitly a goal of that though. |
This appears to be stylelint crashing in hm-linter rather than that specific error To workaround the issue, set stylelint to stylelint:
enabled: false
version: inherit So, I’m leaning toward this is the root cause of this issue as I've not seen this error occur since disabling stylelint, the stylelint issue may be an issue in hmlinter code base, or upstream in stylelint, I've not yet taken a closer look to debug this further |
Example error message -
A few request details for the failed events -
The text was updated successfully, but these errors were encountered: