Anope IRC Services

Denora Stats (discontinued) => Denora 1.5.x Support (Read Only) => Topic started by: Patrick Voege on September 12, 2011, 07:02:29 PM

Title: sync problems
Post by: Patrick Voege on September 12, 2011, 07:02:29 PM
Hi,

I was wondering how to fix this error I am about to paste?

[Sep 10 16:44:31 2011] Backing up MYSQL tables to '/home/patrick/stats/backups'
[Sep 10 16:44:31 2011] MySQL Commands out of sync error: Commands out of sync; you can't run this command now : Success
[Sep 10 16:44:31 2011] MySQL Commands out of sync error: Commands out of sync; you can't run this command now : Success
[Sep 10 16:44:31 2011] MySQL Commands out of sync error: Commands out of sync; you can't run this command now : Success
[Sep 10 16:44:31 2011] MySQL Commands out of sync error: Commands out of sync; you can't run this command now : Success
[Sep 10 16:44:31 2011] MySQL Commands out of sync error: Commands out of sync; you can't run this command now : Success
[Sep 10 16:46:05 2011] MySQL Commands out of sync error: Commands out of sync; you can't run this command now : No such file or directory
[Sep 10 16:46:05 2011] MySQL Commands out of sync error: Commands out of sync; you can't run this command now : No such file or directory
[Sep 10 16:46:05 2011] Disabling MySQL due to an error
[Sep 10 16:52:20 2011] Trying to reconnect to MySQL server...
[Sep 10 16:52:20 2011] MySQL: has been enabled.
[Sep 10 16:52:20 2011] Restarting
Title: Re: sync problems
Post by: Charles Kingsley on September 13, 2011, 07:51:59 AM
Latest version of Denora from git?

Happens every time?

Can you provoke it?

MySQL local to the server or hosted somewhere else?
Title: Re: sync problems
Post by: Patrick Voege on September 13, 2011, 07:33:04 PM
this happens everytime it runs the back up command and then it causes statserv to restart everytime and this is the new version of Denora from the site and this is a local mysql from my home connection and I don't think I can provoke it this all default stuff that came with denora nothing is 3rd party.
Title: Re: sync problems
Post by: Charles Kingsley on September 13, 2011, 07:34:13 PM
& my other questions?
Title: Re: sync problems
Post by: Patrick Voege on September 13, 2011, 07:39:12 PM
I modified the reply on my thread you may have to refresh
Title: Re: sync problems
Post by: Charles Kingsley on September 13, 2011, 07:44:27 PM
Local as in 127.0.0.1?
Title: Re: sync problems
Post by: Patrick Voege on September 13, 2011, 08:38:08 PM
yes
Title: Re: sync problems
Post by: Charles Kingsley on September 14, 2011, 07:59:48 AM
How very interesting.

I think we need to see a full debug log from Denora to see what it's doing exactly.

Title: Re: sync problems
Post by: Patrick Voege on September 14, 2011, 08:46:17 AM
I will see what I can do but I am not entirely sure when the back ups start.
Title: Re: sync problems
Post by: Patrick Voege on September 15, 2011, 01:19:48 AM
[Sep 14 17:11:29.031911 2011] debug: Saving FFF information to disk
[Sep 14 17:11:29.035181 2011] debug: Sent: :stats.eagleits.net PING stats.eagleits.net :services.eagleits.net
[Sep 14 17:11:29.035271 2011] debug: Sent: :stats.eagleits.net PING stats.eagleits.net :irc.Aha-irc.net
[Sep 14 17:11:29.035348 2011] debug: Sent: :stats.eagleits.net PING stats.eagleits.net :kyliem.aha-irc.net
[Sep 14 17:11:29.035402 2011] debug: Sent: :stats.eagleits.net PING stats.eagleits.net :irc.eagleits.net
[Sep 14 17:11:29.035427 2011] Trying to reconnect to MySQL server...
[Sep 14 17:11:29.035479 2011] debug: Sent: :StatServ ! #services :Trying to reconnect to MySQL server...
[Sep 14 17:11:29.035506 2011] MySQL: has been enabled.
[Sep 14 17:11:29.036782 2011] debug: Sent: :StatServ ! #services :MySQL: has been enabled.
[Sep 14 17:11:29.036867 2011] MySQL Client Flag for IGNORE SIGPIPE is set on
[Sep 14 17:11:29.066233 2011] Restarting
[Sep 14 17:11:29.066347 2011] debug: Sent: :StatServ ! #services :Restarting
[Sep 14 17:11:29.066401 2011] debug: Sent: :StatServ D #talking :Restarting to resync SQL database
[Sep 14 17:11:29.066434 2011] debug: StatServ leaves #talking
[Sep 14 17:11:29.070049 2011] debug: Sent: :StatServ D #services :Restarting to resync SQL database
[Sep 14 17:11:29.070117 2011] debug: StatServ leaves #services
[Sep 14 17:11:29.071776 2011] debug: Sent: - stats.eagleits.net :Restarting to resync SQL database
[Sep 14 17:11:29 2011] Loading IRCD Protocol Module: [unreal32]
[Sep 14 17:11:29 2011] IRCD Protocol Author: [Denora]
[Sep 14 17:11:29 2011] IRCD Protocol Version: [$Id: unreal32.c 405 2011-02-02 16:18:55Z jobe $]
[Sep 14 17:11:29 2011] Loading stats.db

theres the debug for it restarting
Title: Re: sync problems
Post by: k0nsl on October 12, 2012, 03:31:44 PM
Sorry to resurrect a seemingly disbanded topic, but I have this problem too. What solutions are there other than increasing wait_timeout in MySQL?

-k0nsl
Title: Re: sync problems
Post by: Hal9000 on November 18, 2012, 12:06:59 PM
Running MySQL and Denora on the same server is always recommended due to the high volume of queries.
Also, the backup module requires special permissions which are not enabled by default for mysql users.
Title: Re: sync problems
Post by: Jens Voss on June 05, 2013, 04:46:03 AM
This error was caused by mysql_backup (and mysql_optimize) by not catching the mysql result.

Quote
f you get Commands out of sync; you can't run this command now in your client code, you are calling client functions in the wrong order.

This can happen, for example, if you are using mysql_use_result() and try to execute a new query before you have called mysql_free_result(). It can also happen if you try to execute two queries that return data without calling mysql_use_result() or mysql_store_result() in between.

Its fixed in current git. I also added a "mysql_optimize_event" module, that installs an mysql event on modload to automatically execute "OPTIMIZE TABLE" each midnight. This event is triggered and executed directly on the mysql server.

How many people use mysql_backup? Should we make a mysql_backup_event module for it, too?
(Could be a bit more complicated than the OPTIMIZE TABLE event, but should be doable)

The "BACKUP TABLE" command is deprecated and removed in MySQL 5.5 ( see http://dev.mysql.com/doc/refman/5.1/en/backup-table.html ) , so our mysql_backup module will only work with mysql versions before 5.5. Many newer distributions already use 5.5+, so I think we probably could burn this module with fire.

Title: Re: sync problems
Post by: Hal9000 on June 10, 2013, 06:54:01 PM
kill it! :)