Error: 2006 MySQL server has gone away - caused by plugin Actions

I’m running on ONE DAY OLD installed 2.15 version, with only one tracker…
All i can see it’s only realtime visitors, error that i’ll talk start to appears only after 4-6 hours after installation

This is what i get in widget “Visits over time” as an output:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away - caused by plugin Actions

Some widgets giving me this output:

“Oops… there was a problem during the request. Maybe the server had a temporary issue, or maybe you requested a report with too much data. Please try again. If this error occurs repeatedly please contact your Piwik administrator for assistance.”

this is my mysql version:
[root@piwik ~]# mysql --version
mysql Ver 14.14 Distrib 5.7.9, for Linux (x86_64) using EditLine wrapper

mysql log:

2015-11-19T08:31:51.508037Z 14 [Note] Aborted connection 14 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:31:51.943065Z 11 [Note] Aborted connection 11 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:31:51.959022Z 15 [Note] Aborted connection 15 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:31:51.970022Z 12 [Note] Aborted connection 12 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:31:52.252039Z 13 [Note] Aborted connection 13 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:31:54.072054Z 16 [Note] Aborted connection 16 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:31:54.127069Z 17 [Note] Aborted connection 17 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:32:07.959022Z 27 [Note] Aborted connection 27 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:32:08.076012Z 28 [Note] Aborted connection 28 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:32:08.510022Z 30 [Note] Aborted connection 30 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:32:08.754030Z 29 [Note] Aborted connection 29 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:32:09.097050Z 26 [Note] Aborted connection 26 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:32:09.775246Z 31 [Note] Aborted connection 31 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2015-11-19T08:32:09.999121Z 32 [Note] Aborted connection 32 to db: ‘piwik’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)

i did some modification in
[root@piwik ~]# vi /etc/my.cnf
wait_timeout = 6000
max_allowed_packet= 1024M

and error still appears even after full reinstall piwik

need some help here…

UPD:

here is piwik logs:

INFO Actions[2015-11-19 10:27:35] [eaa56] LOAD DATA INFILE failed… Error was:
INFO Actions[2015-11-19 10:27:35] [eaa56] Try #1: LOAD DATA INFILE : SQLSTATE[HY000]: General error: 1290 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement,
INFO Actions[2015-11-19 10:27:35] [eaa56] Try #2: LOAD DATA LOCAL INFILE : SQLSTATE[HY000]: General error: 1300 Invalid utf8 character string: ‘"x’
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] Failed to get data from API: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away - caused by plugin Actions
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #0 /usr/local/apache2/htdocs/core/ArchiveProcessor/Loader.php(126): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateAllPlugins(‘4’, ‘0’)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #1 /usr/local/apache2/htdocs/core/ArchiveProcessor/Loader.php(74): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive(false, false)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #2 /usr/local/apache2/htdocs/core/Archive.php(901): Piwik\ArchiveProcessor\Loader->prepareArchive(‘Referrers’)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #3 /usr/local/apache2/htdocs/core/Archive.php(715): Piwik\Archive->prepareArchive(Array, Object(Piwik\Site), Object(Piwik\Period\Day))
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #4 /usr/local/apache2/htdocs/core/Archive.php(667): Piwik\Archive->cacheArchiveIdsAfterLaunching(Array, Array)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #5 /usr/local/apache2/htdocs/core/Archive.php(605): Piwik\Archive->getArchiveIds(Array)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #6 /usr/local/apache2/htdocs/core/Archive.php(377): Piwik\Archive->get(‘Referrers_keywo…’, ‘blob’, NULL)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #7 /usr/local/apache2/htdocs/core/Archive.php(468): Piwik\Archive->getDataTable(‘Referrers_keywo…’, NULL)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #8 /usr/local/apache2/htdocs/core/Archive.php(497): Piwik\Archive::getDataTableFromArchive(‘Referrers_keywo…’, ‘3’, ‘day’, ‘2015-11-18’, false, false, NULL, NULL)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #9 /usr/local/apache2/htdocs/plugins/Referrers/API.php(230): Piwik\Archive::createDataTableFromArchive(‘Referrers_keywo…’, ‘3’, ‘day’, ‘2015-11-18’, false, false, false)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #10 [internal function]: Piwik\Plugins\Referrers\API->getSearchEngines(‘3’, ‘day’, ‘2015-11-18’, false, false, false)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #11 /usr/local/apache2/htdocs/core/API/Proxy.php(208): call_user_func_array(Array, Array)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #12 /usr/local/apache2/htdocs/core/Plugin/Visualization.php(259): Piwik\API\Proxy->call(’\Piwik\Plugins\…’, ‘getSearchEngine…’, Array)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #13 /usr/local/apache2/htdocs/core/Plugin/Visualization.php(180): Piwik\Plugin\Visualization->loadDataTableFromAPI()
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #14 /usr/local/apache2/htdocs/core/Plugin/ViewDataTable.php(414): Piwik\Plugin\Visualization->buildView()
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #15 /usr/local/apache2/htdocs/core/Plugin/Report.php(338): Piwik\Plugin\ViewDataTable->render()
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #16 /usr/local/apache2/htdocs/plugins/CoreHome/Controller.php(78): Piwik\Plugin\Report->render()
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #17 [internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(Object(Piwik\Plugins\Referrers\Reports\GetSearchEngines))
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #18 /usr/local/apache2/htdocs/core/FrontController.php(494): call_user_func_array(Array, Array)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #19 /usr/local/apache2/htdocs/core/FrontController.php(94): Piwik\FrontController->doDispatch(NULL, NULL, NULL)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #20 /usr/local/apache2/htdocs/core/dispatch.php(34): Piwik\FrontController->dispatch()
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #21 /usr/local/apache2/htdocs/index.php(27): require_once(’/usr/local/apac…’)
ERROR CoreHome[2015-11-19 10:27:35] [eaa56] #22 {main}

Same error here. Also on 2.15 just downloaded and getting this error.

see http://piwik.org/faq/troubleshooting/faq_183/

as i told in my previous post, i did change those parameters in my.cnf

did you restart mysql?

yes, i did it, and also rebooted a machine just in case

and problem still persist

Hi,

I have the issue as well. this is the second instance of Piwik runnning: the previous installation went fine
At install time I got a GET request to piwik.php failed. Try whitelisting this URL from
HTTP Authentication and disable mod_security (you may have to ask your
webhost). which could not solve ( running Win2k12 IIS 8.5, for that error I could 30-Nov-2015 00:58:03 UTC] PHP Fatal error: Uncaught exception ‘Exception’ with message ‘The configuration file {C:\inetpub\wwwroot\ANALYTICS2/config/config.ini.php} has not been found or could not be read.’ in C:\inetpub\wwwroot\ANALYTICS2\core\Application\Kernel\EnvironmentValidator.php:64
Stack trace:
#0 C:\inetpub\wwwroot\ANALYTICS2\core\Application\Kernel\EnvironmentValidator.php(45): Piwik\Application\Kernel\EnvironmentValidator->checkConfigFileExists(‘C:\inetpub\wwwr…’, false)
#1 C:\inetpub\wwwroot\ANALYTICS2\core\Application\Environment.php(185): Piwik\Application\Kernel\EnvironmentValidator->validate()
#2 C:\inetpub\wwwroot\ANALYTICS2\core\Application\Environment.php(94): Piwik\Application\Environment->validateEnvironment()
#3 C:\inetpub\wwwroot\ANALYTICS2\piwik.php(56): Piwik\Application\Environment->init()
#4 {main}
thrown in C:\inetpub\wwwroot\ANALYTICS2\core\Application\Kernel\EnvironmentValidator.php on line 64)

I think they are related but dont know.

Thanks

**

ok, i did find solution for my case.:grinning:

**

steps:

  1. export DB from phpMyAdmin
  2. delete old DB and create manually DB with same name.
  3. then delete this lines form exported file:

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/
!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/
!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/
!40101 SET NAMES utf8mb4 */;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /;
/
!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
/
!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

  1. import it to recently created DB

and it works…

hey @runaround9,

having the same problems after migrating piwik to another server I tried your solution and it works for me too.
could you just tell me: why is this working and how you get to this solution?

thx,
j23d

To be honest, I’m not sure…
it might be something related to collation type DB or it just Piwik script messing with something it doesn’t need to

Thank you for this post

try this

ALTER SCHEMA piwik-analytic DEFAULT COLLATE latin1_general_ci ;

see more : MySQL 5.7+ SQLSTATE[HY000]: General error: 2006 MySQL server has gone away - caused by plugin Actions · Issue #9419 · matomo-org/piwik · GitHub

I’m using Piwik 2.16.1, CentOS 6.8, PHP 5.6 and MySQL 5.6

I had a similar Problem with the archive cron job.

Error: Got invalid response from API request: ?module=API&method=API.get&idSite=25&period=year&date=last7&format=php&trigger=archivephp. Response was ‘a:2:{s:6:“result”;s:5:“error”;s:7:“message”;s:92:“SQLSTATE[HY000]: General error: 2006 MySQL server has gone away - caused by plugin Referrers”;}’

At the same time I saw another error in the MySQL logfile.

[ERROR] InnoDB: The total blob data length (1116471) is greater than 10% of the total redo log size (10485760). Please increase total redo log size

That was the problem. As a solution I resized the InnoDB Redo Logs and everything works fine now…