spine dies with Lost connection to MySQL server during query

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

spine dies with Lost connection to MySQL server during query

Post by dalex »

cacti-0.8.8b
cacti-spine-0.8.8b

during polling the poller randomly

SPINE: Poller[0] FATAL: MySQL Error:'2013', Message:'Lost connection to MySQL server during query' (Spine thread)

Help me
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

Re: spine dies with Lost connection to MySQL server during q

Post by dalex »

that is not who does not know the answer?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: spine dies with Lost connection to MySQL server during q

Post by phalek »

There are other threads with the same issue:
http://forums.cacti.net/viewtopic.php?f ... 8&start=30

looks like increasing the max_connections or even switching to MariaDB may solve the issues.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

Re: spine dies with Lost connection to MySQL server during q

Post by dalex »

не могли бы вы направить меня как перейти на MariaDB.

установлена ubunta 12.04
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

Re: spine dies with Lost connection to MySQL server during q

Post by dalex »

could you describe point by point how to switch to MariaDB
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: spine dies with Lost connection to MySQL server during q

Post by browniebraun »

Before switching to Maria DB, I would check what the current setting of the global variable max_connection of your MySQL instance is.
Verify that this limit has been reached. How many open connections do you see during the polling cycle?
After that, and if you have enough memory, you can increase that setting.
If not and if you have many active users, another option will be to disable the use of persistent connections.
In that case you have to modify ./lib/databases.php and update function "db_connect_real":

Modify lines from:
$dsn = "$db_type://" . rawurlencode($user) . ":" . rawurlencode($pass) . "@" . rawurlencode($host) . "/" . rawurlencode($db_name) . "?persist";
if ($db_ssl && $db_type == "mysql") {
$dsn .= "&clientflags=" . MYSQL_CLIENT_SSL;
}
elseif ($db_ssl && $db_type == "mysqli") {
$dsn .= "&clientflags=" . MYSQLI_CLIENT_SSL;
}

to:
$dsn = "$db_type://" . rawurlencode($user) . ":" . rawurlencode($pass) . "@" . rawurlencode($host) . "/" . rawurlencode($db_name) . "?";
if ($db_ssl && $db_type == "mysql") {
$dsn .= "clientflags=" . MYSQL_CLIENT_SSL;
}
elseif ($db_ssl && $db_type == "mysqli") {
$dsn .= "clientflags=" . MYSQLI_CLIENT_SSL;
}

Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

Re: spine dies with Lost connection to MySQL server during q

Post by dalex »

thanks, but I already have installed.
https://downloads.mariadb.org/mariadb/r ... rsion=10.0
tomorrow I will write
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

Re: spine dies with Lost connection to MySQL server during q

Post by dalex »

there was one problem WARNING: Recache Event Detected for Host
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

Re: spine dies with Lost connection to MySQL server during q

Post by dalex »

no one knows why you receive this error?

WARNING: Recache Event Detected for Host
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

Re: spine dies with Lost connection to MySQL server during q

Post by dalex »

good day.

got another problem can anyone tell me with a solution?

RECACHE STATS: RecacheTime:0.4688 HostsRecached:1
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: spine dies with Lost connection to MySQL server during q

Post by browniebraun »

Why do you believe that a recache event of a host is a problem?

Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

Re: spine dies with Lost connection to MySQL server during q

Post by dalex »

if this is not the problem then what?
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: spine dies with Lost connection to MySQL server during q

Post by browniebraun »

Occurs if a host will be marked to be recached. (e.g. caused by an index change due to a reboot of that host)
Nothing to be worried about.

Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
dalex
Posts: 13
Joined: Thu Nov 20, 2014 1:27 am

Re: spine dies with Lost connection to MySQL server during q

Post by dalex »

problems with no charts.

but why then WARNING: Recache Event Detected for Host.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests