Skip to content
This repository was archived by the owner on Sep 7, 2026. It is now read-only.
This repository was archived by the owner on Sep 7, 2026. It is now read-only.

Concurrency is limited to patterns, not files. (Error: EMFILE, too many open files) #627

Description

@Tmunayyer

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

The concurrency option's description is as follows:

Limits the number of simultaneous requests to fs.

This was a bit misleading. I was running into errors of Error: EMFILE, too many open files while using this plugin even changing concurrency down to a value of 1.

The actual code in the plugin is as follow:

await Promise.all(this.patterns.map((item, index) => limit(async () => { ...

This means that if you pass an entire directory like node_modules, this plugin will go ham opening files which might cause an error if your process's open file limit is too low.

Maybe its a misuse of the plugin but it might be worth being more specific in the docs.

Your Proposal for Changes

I would specify this limits the number of concurrent patterns that will be running but the number of files opened might still be quite large if you pass a directory. Perhaps something like:

Limits the number of simultaneous patterns that will run concurrently. This has no affect on limiting the number of files opened for directories.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions