I'm trying to figure out if anywhere in the cacti setup you have the option to choose persistent connections to mysql or if this is even an option? I don't see that it is but thought I'd ask the more knowledgeable.
I'm running 0.8.7.e and what I'm see is that cacti is making a connection to the mysql database for each graph lookup when I view the graphs produced by cacti on the graphs page.
Now I don't have a problem with this but instead of terminating like they should they sleep on mysql but never get reused as further graph requests open new connections. I've got only a limited number of resources and trying to make cacti fit into those is becoming impossible.
Now I know I can change the mysql timeout and interactive timeout settings but I have a need for apache to keep a connection open and not get reset by limiting my mysql timeout. So I really can't use that option.
Does anyone know or have had this problem that's fixed the mysql connection issue with cacti?
Thanks.
~cert
mysql connections
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Cacti User
- Posts: 51
- Joined: Thu Aug 06, 2009 9:18 pm
Don't I wish everything was this easy. <chuckles>
If so I'd put in my.cnf
Like I said I'm working within the resources I have with my hardware. Adding connections means I have to take memory away from other mysql tasks namely caching to memory which forces more disk writes so I trade connections for performance. Optimally cacti wouldn't flood mysql with needless connections and close them properly when they are done being used.
Thanks for the input, it is appreciated.
~cert
If so I'd put in my.cnf
Code: Select all
upgrade_memory = 24G
Thanks for the input, it is appreciated.
~cert
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Cacti closes connections. It might have something to do with the Apache. Not sure. It may have something to do with the persistent connections and Adodb. Maybe we need to check for Adodb bugs and do an upgrade if necessary.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 2
- Joined: Mon Oct 19, 2009 9:43 am
- Location: Solon, OH
I'm also getting a lot of open connections; I attached a screenshot to give a better idea. I'm not sure whether it's the poller or cacti-spine that's opening these connections (I'll investigate further), but it shouldn't be apache, as these connections keep getting spawned even if no one is using the web interface.
- Attachments
-
- Mysql Administrator Screenshot of too many connections from Cacti
- mysqlcacti.jpeg (125.46 KiB) Viewed 2394 times
-
- Posts: 2
- Joined: Mon Oct 19, 2009 9:43 am
- Location: Solon, OH
Changed PConnect to Connect in lib/database.php per the advice of TheWitness here: http://forums.cacti.net/about20493.html
It seems to be closing connections now.. but it'll take awhile to be sure. Will post back if this doesn't work.
It seems to be closing connections now.. but it'll take awhile to be sure. Will post back if this doesn't work.
Who is online
Users browsing this forum: No registered users and 0 guests