Non-persistent MySQL connections are not being closed in Cacti.
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C
- Estrellas
- 40.4k
- Forks
- 8.1k
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 96
Descripción
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:
https://github.com/Cacti/cacti/issues/5401
PHP Version
PHP 8.1.2-1ubuntu2.13
Operating System
Ubuntu 22.04
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza reproduciendo el crecimiento de conexiones en los daemons cactid y flow-capture bajo PHP 8.1.2 con conexiones MySQL no persistentes, utilizando el issue enlazado de Cacti como contexto. Rastrea el ciclo de vida de la conexión PDO durante sondeos repetidos de cinco minutos; se considera terminado cuando las conexiones se liberan en lugar de acumularse hasta que MySQL alcanza su límite.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- mysql, php
- Área
- backend, database
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100