package limits

import "github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/limits"

Package limits provides routines to check and enforce certain resource limits on the Cloud SQL client proxy process.

Index

Constants

const ExpectedFDs = 8500

Each connection handled by the proxy requires two file descriptors, one for the local end of the connection and one for the remote. So, the proxy process should be able to open at least 8K file descriptors if it is to handle 4K connections to one instance.

Functions

func SetupFDLimits

func SetupFDLimits(wantFDs uint64) error

SetupFDLimits ensures that the process running the Cloud SQL proxy can have at least wantFDs number of open file descriptors. It returns an error if it cannot ensure the same.

Source Files

limits.go

Version
v1.37.7 (latest)
Published
Apr 16, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
2 months ago

Tools for package owners.