Skip to content

Non-persistent MySQL connections are not being closed in Cacti. #11750

Open
@elyograg

Description

@elyograg

Description

I have been investigating a problem with Cacti where it opens a new database connection on every 5 minute poll interval, and never closes them, eventually running the DB server out of connections, even with the max_connections set to 1000. It is a new install of Cacti, I am not upgrading.

Eventually I figured out that configuring Cacti to use persistent database connections solved the issue. So there is a workaround.

I am seeing the biggest problem with the long-running daemons, one for cacti itself called cactid, the other for a cacti plugin called flowview. The service for that one is called "flow-capture".

The cacti project is claiming that they have never had to worry about closing connections before and they think something probably changed in PDO.

This is the issue I opened on Cacti for the problem:

Cacti/cacti#5401

PHP Version

PHP 8.1.2-1ubuntu2.13

Operating System

Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions