Skip to main content
Server.prototype.maxRequestsPerSocket - http - Node documentation
property Server.prototype.maxRequestsPerSocket

Usage in Deno

import { Server } from "node:http";

The maximum number of requests socket can handle before closing keep alive connection.

A value of 0 will disable the limit.

When the limit is reached it will set the Connection header value to close, but will not actually close the connection, subsequent requests sent after the limit is reached will get 503 Service Unavailable as a response.

Type

number | null
Back to top