...

Package limits

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

Overview ▾

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

Constants

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.

const ExpectedFDs = 8500

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.