Skip to content

"Gracefully shutting down. To force exit, press ^C again. Please wait…" takes several seconds #4498

@fregante

Description

@fregante

Not strictly a bug but I'd like to understand why it's taking 9 seconds to stop processes. From what I understand the log was added (#4145) to avoid FS corruption during builds/writes, but this happens when Webpack is idling (confirmed by --progress)

This is my watch config

  watchOptions: {
    aggregateTimeout: 200,
  },

This brings it down to 1.5 seconds

  watchOptions: {
    aggregateTimeout: 200,
+   ignored: /node_modules/,
  },

This makes nearly instant (probably 0.3s):

    watchOptions: {
      aggregateTimeout: 200,
      ignored: /node_modules/,
+     poll: 300,
    },

I was unable to find any debugging options, so my questions are:

  • what's delaying the closure exactly?
  • can this perf be improved without using poll?
  • what are the consequences of using poll vs not using it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions