Piwik ramdom stopped working!


#1

When i login, i get this message:
SQLSTATE[HY000]: General error: 1032 Can’t find record in ‘piwik_log_visit’

Backtrace:

#0 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/libs/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/libs/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’???SELECT???..’, Array)
#3 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/Db/Adapter/Pdo/Mysql.php(220): Zend_Db_Adapter_Pdo_Abstract->query(’???SELECT???..’, Array)
#4 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/plugins/Actions/Actions.php(652): Piwik_Db_Adapter_Pdo_Mysql->query(’???SELECT???..’, Array)
#5 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/plugins/Actions/Actions.php(563): Piwik_Actions->archiveDayQueryProcess(‘log_visit.%s as…’, ‘log_visit’, ‘log_visit.visit…’, false, ‘log_visit.%s, i…’, ‘visit_entry_ida…’, Object(Piwik_ArchiveProcessing_Day))
#6 [internal function]: Piwik_Actions->archiveDay(Object(Piwik_Event_Notification))
#7 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/libs/Event/Dispatcher.php(284): call_user_func_array(Array, Array)
#8 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/PluginsManager.php(633): Event_Dispatcher->postNotification(Object(Piwik_Event_Notification), false, false)
#9 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/ArchiveProcessing/Day.php(45): Piwik_PostEvent(‘ArchiveProcessi…’, Object(Piwik_ArchiveProcessing_Day))
#10 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/ArchiveProcessing.php(473): Piwik_ArchiveProcessing_Day->compute()
#11 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/Archive/Single.php(226): Piwik_ArchiveProcessing->launchArchiving()
#12 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/Archive/Array/IndexedBySite.php(192): Piwik_Archive_Single->prepareArchive()
#13 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/Archive/Array/IndexedBySite.php(131): Piwik_Archive_Array_IndexedBySite->getArchiveIdsAfterLaunching(Array)
#14 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/Archive/Array/IndexedBySite.php(108): Piwik_Archive_Array_IndexedBySite->loadValuesFromDB(Array)
#15 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/Archive/Array/IndexedBySite.php(73): Piwik_Archive_Array_IndexedBySite->getValues(Array)
#16 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/plugins/MultiSites/API.php(120): Piwik_Archive_Array_IndexedBySite->getDataTableFromNumeric(Array)
#17 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/plugins/MultiSites/Controller.php(65): Piwik_MultiSites_API->getAll(‘day’, ‘2012-07-01’, false)
#18 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/plugins/MultiSites/Controller.php(37): Piwik_MultiSites_Controller->getSitesInfo(Object(Piwik_View))
#19 [internal function]: Piwik_MultiSites_Controller->index()
#20 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/core/FrontController.php(138): call_user_func_array(Array, Array)
#21 /var/www/vhosts/xxxx/xxxx.com/httpdocs/stats/index.php(53): Piwik_FrontController->dispatch()
#22 {main}

Please help, i have no idea what happend, or why, how can i fix this?


#2

anyone?


#3

Still no answer, someone must have an idea???


#4

Hi to be honest you need to provide more info if you are going to find teh solution.

What are the steps that get you to this error?

Can you login?

Is this a new or updated install?

What server environment are you on?

You say its random how long was it working? How random is it 1 or 2 or 45 times a day not working?

have you changed permissions any where?


(Matthieu Aubry) #5

Can you try to update your Mysql server version? looking on the web it seems like a bug in mysql maybe


#6

I use ubuntu server 12.04 with apache and php5.2 with mysql 5.1, piwik 1.8.2

this is an updated install, however i have been using this version if piwik since its release, but this issue started 5 days ago,

This error is what shows when i try to login.

(this is only an issue with piwik not any other system on the server)

the only change that their had been was more memory added to the server, but have run many tests on memory and its nice and stable.

@matt updating Mysql server to version 5.5 may damage the other databases on the server, (i dont know for sure, and their is no good web info about it, which has given me peace of mind, which is why i have not messed with it)

is the away to reboot piwik’s database while keeping all archived data intact?


#7

On the web i also saw the upgrade to MySQL as a likely solution.

I did see one refernce where it may be related to a memory limit.

Could you bump up the memory allocation to php or mysql and see if that helps in this case?

Have you tried another browser just to see if it changes teh result any. A screen shot of error could help as well.

regards


#8

[quote=lesjokolat]
On the web i also saw the upgrade to MySQL as a likely solution.

I did see one refernce where it may be related to a memory limit.

Could you bump up the memory allocation to php or mysql and see if that helps in this case?

Have you tried another browser just to see if it changes teh result any. A screen shot of error could help as well.

regards[/quote]

oh yes that is a very good idea, the php.ini had not been adjusted to account to extra memory yet,
what peram is it for the php (line of code example)?


#9

Heres one example not sure your php.ini set up but try as a guide to adjust yours . I read if one has it set to 32 then double it. once you hit 128 or higher sometimes you may be exceeding the actual apache limit so try to be reasonable when adjusting to not over compensate. Good luck

<?php ini_set('memory_limit','40M'); $limit=100000000; $tab=array(); for ($i=0;$i<=$limit;$i++){ $tab[]=$i*50000.0; } ?>

#10

Fixed, by updaing php.ini, but apache and mysql restart.

bUPDATE:[/b] I got an email from ubuntu, which says why i had the problem, thanks heavens it was not something i did because it all happend that same day, below is a part of the email they sent me.

[i]Hello Phillip,

Please forward this email to your technical contact(s) if you do not manage your Ubuntu system(s) directly.

We would like to inform you that on July 1, 2012 a bug a was exposed in the Linux kernel in connection with the June 30th Leap Second b. An Ubuntu bug c was consequently filed on Launchpad. The primary effect is high CPU load in kernel as well as user processes.

This bug affects all supported versions of Ubuntu. Note that this bug is very widespread, impacting almost all modern Linux operating systems.

A fix is currently being prepared for this issue. As a workaround for affected systems, either of the following actions should alleviate the CPU load:

  1. Execute the following command as root (or prepend ‘sudo’ if non-root):

date -u -s “$(date -u -R)”

OR

  1. Reboot

The permanent fix will be in the kernel well before the next leap second (as yet unannounced), which will be a minimum of six months away most likely in 2015.

Do not hesitate to contact Canonical Support if you require further help. You can do this via a support case within Landscape (https://landscape.canonical.com) or by phone (numbers listed in Landscape).

The Canonical Support Services Team

Canonical Group Limited 27th Floor, Millbank Tower 21-24 Millbank London SW1P 4QP United Kingdom[/i]