Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed May 24, 2017 3:06 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Warning_Mysql
PostPosted: Thu Mar 03, 2005 9:19 am 
Offline
User avatar

Joined: Thu Mar 03, 2005 9:13 am
Posts: 24
Location: Brasil
Guys, anyone can aid???

Hi...

What's going on:

Warning: mysql_connect(): Too many connections in /usr/local/apache/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Too many connections in /usr/local/apache/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Too many connections in /usr/local/apache/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Too many connections in /usr/local/apache/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Fatal error: Call to undefined function: cacti_log() in /usr/local/apache/htdocs/cacti/lib/database.php on line 51


And second, where do I have to paste de file download.php, for thresholt start to work????

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 03, 2005 9:31 am 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5945
Location: Michigan, USA
You are running out of connections.

You can alter the amount of allowed connections in your /etc/my.cnf. If you are running windows, I'm not sure where that file is located.

Code:
[mysqld]
set-variable=max_connections=250


Check out the mysql documentation at: http://dev.mysql.com/doc/mysql/en/too-many-connections.html

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Thu Mar 03, 2005 9:44 am 
Offline
User avatar

Joined: Thu Mar 03, 2005 9:13 am
Posts: 24
Location: Brasil
Solved


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 03, 2005 8:11 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
thewall,

Please make sure that if you are running cacti that you watch the number of concurrent connections and threads.

Total MySQL Connections Possible = Concurrent Connections * Threads

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 9:05 am 
Offline

Joined: Thu Nov 18, 2004 12:22 am
Posts: 24
I was having the same issue so I found this thread. I changed the max connections to 1000 and all seems to be fine, but my question is, why are those connections being used? Right now I am the only one using the server so I know its not web or admin connections. So I printed out SHOW PROCESSLIST below. It looks like cactiuser is the user for all of them. I'm guessing that everytime cacti needs to insert an snmp stat it creates a connection but why doesnt it drop the connection when its done? I have about 300 graphs I'm doing, does that mean my max connections needs to be >= 300? Or am I totally wrong?


+------+-----------+-----------+---------+---------+-------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+-----------+-----------+---------+---------+-------+-------+------------------+
| 6551 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6552 | cactiuser | localhost | cactidb | Sleep | 24367 | | NULL |
| 6554 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 6555 | cactiuser | localhost | cactidb | Sleep | 24213 | | NULL |
| 6557 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6604 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6605 | cactiuser | localhost | cactidb | Sleep | 23180 | | NULL |
| 6607 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6608 | cactiuser | localhost | cactidb | Sleep | 23020 | | NULL |
| 6632 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6633 | cactiuser | localhost | cactidb | Sleep | 22415 | | NULL |
| 6872 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6873 | cactiuser | localhost | cactidb | Sleep | 19110 | | NULL |
| 6927 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6928 | cactiuser | localhost | cactidb | Sleep | 18408 | | NULL |
| 6951 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6952 | cactiuser | localhost | cactidb | Sleep | 17911 | | NULL |
| 6954 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6955 | cactiuser | localhost | cactidb | Sleep | 17610 | | NULL |
| 6957 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6958 | cactiuser | localhost | cactidb | Sleep | 17303 | | NULL |
| 6960 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6961 | cactiuser | localhost | cactidb | Sleep | 17009 | | NULL |
| 6963 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 6964 | cactiuser | localhost | cactidb | Sleep | 16749 | | NULL |
| 6966 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6967 | cactiuser | localhost | cactidb | Sleep | 16413 | | NULL |
| 6969 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 6970 | cactiuser | localhost | cactidb | Sleep | 16003 | | NULL |
| 6972 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 6973 | cactiuser | localhost | cactidb | Sleep | 15808 | | NULL |
| 6975 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 6976 | cactiuser | localhost | cactidb | Sleep | 15509 | | NULL |
| 6978 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 6980 | cactiuser | localhost | cactidb | Sleep | 15041 | | NULL |
| 7005 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7006 | cactiuser | localhost | cactidb | Sleep | 14515 | | NULL |
| 7029 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7030 | cactiuser | localhost | cactidb | Sleep | 14023 | | NULL |
| 7032 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7033 | cactiuser | localhost | cactidb | Sleep | 13723 | | NULL |
| 7060 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7061 | cactiuser | localhost | cactidb | Sleep | 13083 | | NULL |
| 7132 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7133 | cactiuser | localhost | cactidb | Sleep | 11780 | | NULL |
| 7156 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7157 | cactiuser | localhost | cactidb | Sleep | 11314 | | NULL |
| 7159 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7160 | cactiuser | localhost | cactidb | Sleep | 11020 | | NULL |
| 7163 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7164 | cactiuser | localhost | cactidb | Sleep | 10684 | | NULL |
| 7221 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7222 | cactiuser | localhost | cactidb | Sleep | 9994 | | NULL |
| 7267 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7268 | cactiuser | localhost | cactidb | Sleep | 9221 | | NULL |
| 7270 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7271 | cactiuser | localhost | cactidb | Sleep | 8912 | | NULL |
| 7273 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7274 | cactiuser | localhost | cactidb | Sleep | 8611 | | NULL |
| 7276 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7277 | cactiuser | localhost | cactidb | Sleep | 8314 | | NULL |
| 7279 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7280 | cactiuser | localhost | cactidb | Sleep | 8011 | | NULL |
| 7282 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7283 | cactiuser | localhost | cactidb | Sleep | 7712 | | NULL |
| 7391 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7392 | cactiuser | localhost | cactidb | Sleep | 6167 | | NULL |
| 7394 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7395 | cactiuser | localhost | cactidb | Sleep | 5909 | | NULL |
| 7397 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7398 | cactiuser | localhost | cactidb | Sleep | 5623 | | NULL |
| 7445 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7446 | cactiuser | localhost | cactidb | Sleep | 4716 | | NULL |
| 7448 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7449 | cactiuser | localhost | cactidb | Sleep | 4414 | | NULL |
| 7451 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7452 | cactiuser | localhost | cactidb | Sleep | 3978 | | NULL |
| 7454 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7455 | cactiuser | localhost | cactidb | Sleep | 3817 | | NULL |
| 7457 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7458 | cactiuser | localhost | cactidb | Sleep | 3520 | | NULL |
| 7460 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7461 | cactiuser | localhost | cactidb | Sleep | 3170 | | NULL |
| 7463 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7464 | cactiuser | localhost | cactidb | Sleep | 2920 | | NULL |
| 7466 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7467 | cactiuser | localhost | cactidb | Sleep | 2613 | | NULL |
| 7469 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7470 | cactiuser | localhost | cactidb | Sleep | 2314 | | NULL |
| 7472 | cactiuser | localhost | cactidb | Sleep | 1 | | NULL |
| 7473 | cactiuser | localhost | cactidb | Sleep | 1989 | | NULL |
| 7475 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7476 | cactiuser | localhost | cactidb | Sleep | 1718 | | NULL |
| 7478 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7479 | cactiuser | localhost | cactidb | Sleep | 1406 | | NULL |
| 7481 | cactiuser | localhost | cactidb | Sleep | 5 | | NULL |
| 7482 | cactiuser | localhost | cactidb | Sleep | 1123 | | NULL |
| 7577 | root | localhost | NULL | Query | 0 | NULL | show processlist |
+------+-----------+-----------+---------+---------+-------+-------+------------------+
98 rows in set (0.09 sec)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 9:12 am 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5945
Location: Michigan, USA
What do you have the following settings at:

Console -> Cacti Settings -> Poller -> Maximum Concurrent Poller Processes

Console -> Cacti Settings -> Poller -> Maximum Threads per Process

The default for both is 2, by the number of connections, I would say you have it set to high.

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 9:46 am 
Offline

Joined: Thu Nov 18, 2004 12:22 am
Posts: 24
Thanks for replying, actually I never changed them and they were set to 1. I changed them just now to 2. I'm running on Redhat ES if that matters.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 9:53 am 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5945
Location: Michigan, USA
Um, I will investigate.

Should make a difference what OS you are running.

Btw, could some of those connections be web users?

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 10:00 am 
Offline

Joined: Thu Nov 18, 2004 12:22 am
Posts: 24
Thanks again for the quick reply.

No one at work knows about it except me and 1 other person who is working on this with me. I suppose 2 of the connections could be web users :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 3:53 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
anonfoo,

Are you using cactid or cmd.php for polling? Also, due to the way the graphs are rendered, a full screen full of graphs causes many connections to the database. We are looking for ways to optimize moving forward. However, this is the case today.

If you are running cactid, check for hung processes by running "ps -ef | grep cactid" and post your results.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 4:59 pm 
Offline

Joined: Thu Nov 18, 2004 12:22 am
Posts: 24
No Cactid but it seems like setting the max connections resolved the issue. I have about 186 processes running and its holding there.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 5:04 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
If those are cmd.php processes, that's far more than I would run.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 5:07 pm 
Offline

Joined: Thu Nov 18, 2004 12:22 am
Posts: 24
hmm I'll look at cactid tomorrow...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 15, 2005 10:32 pm 
Offline

Joined: Thu Nov 18, 2004 12:22 am
Posts: 24
Finally got cactid installed tonight, man that thing rocks! Its a million times faster!!! Working great, thanks!


Top
 Profile  
 
 Post subject: Re: Warning_Mysql
PostPosted: Fri Feb 17, 2017 11:35 pm 
Offline

Joined: Fri Feb 17, 2017 1:22 am
Posts: 2
Location: US Bank Tower,26th Floor, 633 W 5th Street, Los Angeles 90071
:lol:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group