Skip to content

Opening 5+ tabs causes Express to hang indefinitely #423

@jmikrut

Description

@jmikrut
  • Operating System: Mac OS Monterey 12.4
  • Node Version: 14.18.1
  • NPM Version: 6.14.15
  • webpack Version: 5.6.0
  • ${package} Version: 2.25.1

Expected Behavior

I should be able to open many tabs and not cause my Express server to indefinitely hang.

Actual Behavior

Right now, opening more than 5 tabs with webpack-hot-middleware causes Express, and all subsequent requests, to hang indefinitely. The problem is caused by webpack-hot-middleware specifically, as removing it and relying solely on webpack-dev-middleware does not present the same issue.

There is a video demonstrating the behavior within the Payload CMS repo:
payloadcms/payload#824

Code

  const compiler = webpack(webpackDevConfig);

  router.use(webpackDevMiddleware(compiler, {
    publicPath: webpackDevConfig.output.publicPath as string,
  }));

  router.use(webpackHotMiddleware(compiler));

How Do We Reproduce?

Simply try to open more than 5 tabs at once with webpack-hot-middleware running.

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