Archive problem after upgrade

After upgrading to latest piwik (2.1.0) I started having problems with autoarchiving…

when I try to manually call archive script I get following error:

/usr/bin/php5 /var/www/path/piwik/misc/cron/archive.php – url=https://mydomain.com/piwik/ > /var/www/piwiklog/piwik-archive.log
Error in the last Piwik archive.php run:
1 total errors during this script execution, please investigate and try and fix these errors. First error was: Error unserializing the following response from https://mydomain.com/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=month&date=last2&format=php&token_auth=cacd3e99f6d4a999c25fc540cd999dad&trigger=archivephp: INFO VisitsSummary[2014-03-16 19:55:24] [49252] Purging temporary archives: skipped.
a:2:{s:7:“2014-02”;d:1031394;s:7:“2014-03”;d:539558;}

PHP version PHP 5.3.3-7+squeeze19

any idea?

1 Like

I would also like to know the “Error unserializing the following response from…” error means. The message from the API is “Purging temporary archives: skipped”, which doesn’t seem like an error at all. But the fact that the archive script reports an error unserializing that message from the API makes me wonder what’s going on here.

Could someone please confirm whether this is anything to worry about, and whether we can safely ignore this message by commenting out the [log] section in config.ini.php?

Can you try setting


[log]
log_writers[] = file

in your config.ini.php? - Did you change the log_level of your instance?

only modification additional to upgrade instructions is:

adapter = MYSQLI

and after that there is:

[log]
log_level = “INFO”

now I have added:

log_writers[] = file

according to http://developer.piwik.org/api-reference/Piwik/Log it should log to …piwik/tmp/logs/ ?

Please copy the settings over to config.ini.php, don’t edit globals.ini.php directly.

please delete

[log]
log_writers[] = file

and edit

INFO to WARN like this:

[log]
log_level = “WARN”

This is just for testing, if the error is gone then.

ok, here is my config.ini.php:

[i]adapter = MYSQLI

[log]

#log_level = “INFO”
#log_writers[] = file
log_level = “WARN”[/i]

let’s wait for cron… I hope that I will soon stop receiving error emails…

Hi povezi,
Did reducing the log_level to WARN stop the error from appearing?

Thanks,

Pat

Hi Pat,

I still receive cron errors like this with 2.1.0 (but this is maybe unrelated?):

PHP Warning: filemtime(): stat failed for /var/www/path/piwik/tmp/climulti/f77cc04928ddba15b9805460ccb4ed4d239616bd4577c7ff8b7656da4afa47dbaa766b4c43d4205b4f99d72a4640a1636aa50.output in /var/www/path/piwik/core/CliMulti.php on line 184
PHP Warning: unlink(/var/www/path/piwik/tmp/climulti/f77cc04928ddba15b9805460ccb4ed4d239616bd4577c7ff8b7656da4afa47dbaa766b4c43d4205b4f99d72a4640a1636aa50.output): No such file or directory in /var/www/owncloud/piwik/core/CliMulti.php on line 187

But now I have upgraded from Piwik 2.1.0 to Piwik 2.3.0 so lets wait for results :wink:

although I have run: chmod -R 775 /var/www/path/piwik/tmp

I still have similar problem with 2.3.0 :

PHP Warning: file_put_contents(/var/www/path/piwik/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied in /var/www/path/piwik/core/CliMulti/Process.php on line 140

failed to open stream: Permission denied in /var/www/path/piwik/core/CliMulti/Process.php on line 140

check that the user running your Piwik archiving cron, has permission to create/write files in tmp/climulti

Thanks povezi

Matt, thnx for advice, but even after

Each hour (cron runs hourly) I still get the same warning:

PHP Warning: file_put_contents(/var/www/path/piwik/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied in /var/www/path/piwik/core/CliMulti/Process.php on line 140

After you get this message, do you see a file /var/www/path/piwik/tmp/climulti/archive.sharedsiteids.pid in your server? which permission has this file got?

Hi Matt,

there is not .pid file there :

ls -al /var/www/path/piwik/tmp/climulti/
total 12
drwxrwxrwx 2 www-data www-data 4096 Jun 2 09:18 .
drwxrwxr-x 10 www-data www-data 4096 May 29 10:15 …
-rwxrwxr-x 1 www-data www-data 222 Mar 14 19:34 .htaccess