failconns

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package failconns implements a workload which creates many database connections forcing Postgres to fork children processes until the value of max_connections is reached. When max_connections is reached all connection slots are exhausted and no one client can connect to Postgres.

Implementation of the workload is quite simple - create new connections in a loop until Postgres starts respond with error. By default, an array with 1000 slots is used, so it possible to set max_connections to higher value and pass the workload with no errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWorkload

func NewWorkload(config Config, logger log.Logger) (noisia.Workload, error)

NewWorkload creates a new workload with specified config.

Types

type Config

type Config struct {
	// Conninfo defines connection string used for connecting to Postgres.
	Conninfo string
}

Config defines configuration settings for failconns workload.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL