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

http2: fix excessive CPU usage when using allowHTTP1=true #52713

Merged
merged 1 commit into from Apr 28, 2024

Commits on Apr 26, 2024

  1. http2: fix excessive CPU usage when using allowHTTP1=true

    When Http2SecureServer is configured with `allowHTTP1=true`, it calls
    `setupConnectionsTracking` to start monitoring for idle HTTP1
    connections. `setupConnectionsTracking` expects to have
    `this.connectionsCheckingInterval` property defined, but it does not
    exist on `Http2SecureServer`. This `undefined` value is passed to
    `setInterval`, which results in `checkConnections` being called on
    every tick, creating significant additional load on the server CPU.
    The fix is to define `this.connectionsCheckingInterval` on the
    Http2SecureServer instance.
    
    Refs: nodejs#51569
    eugene1g committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    2ea4b2a View commit details
    Browse the repository at this point in the history