matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.57k stars 2.61k forks source link

/core/DataTable.php on line 1251 #7605

Closed approached closed 9 years ago

approached commented 9 years ago

Hi@all

What is now wrong with archive process.

Log:

root@ip-172-31-20-84:~# /usr/bin/php /opt/stats.pregnant.com/console core:archive --url=http://www.pregnant.com
INFO CoreConsole[2015-04-01 07:51:55] ---------------------------
INFO CoreConsole[2015-04-01 07:51:55] INIT
INFO CoreConsole[2015-04-01 07:51:55] Piwik is installed at: http://www.pregnant.com/index.php
INFO CoreConsole[2015-04-01 07:51:55] Running Piwik 2.12.1 as Super User
INFO CoreConsole[2015-04-01 07:51:56] ---------------------------
INFO CoreConsole[2015-04-01 07:51:56] NOTES
INFO CoreConsole[2015-04-01 07:51:56] - Reports for today will be processed at most every 150 seconds. You can change this value in Piwik UI > Settings > General Settings.
INFO CoreConsole[2015-04-01 07:51:56] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
INFO CoreConsole[2015-04-01 07:51:56] - Archiving was last executed without error 21 hours 41 min ago
INFO CoreConsole[2015-04-01 07:51:56] - Will pre-process 1 Segments for each website and each period: customVariablePageValue1==7
INFO CoreConsole[2015-04-01 07:51:56] - Will process 1 websites with new visits since 21 hours 41 min , IDs: 1
INFO CoreConsole[2015-04-01 07:51:56] - Will process 1 other websites because some old data reports have been invalidated (eg. using the Log Import script) , IDs: 1
INFO CoreConsole[2015-04-01 07:51:56] ---------------------------
INFO CoreConsole[2015-04-01 07:51:56] START
INFO CoreConsole[2015-04-01 07:51:56] Starting Piwik reports archiving...
INFO CoreConsole[2015-04-01 07:52:19] Will pre-process for website id = 1, day period, the following 1 segments: { customVariablePageValue1==7 } 
INFO CoreConsole[2015-04-01 07:52:22] Archived website id = 1, period = day, 490041 visits in last last52 days, 4363 visits today, Time elapsed: 26.077s
INFO CoreConsole[2015-04-01 07:52:22] Will pre-process for website id = 1, week period, the following 1 segments: { customVariablePageValue1==7 } 
INFO CoreConsole[2015-04-01 07:53:12] Archived website id = 1, period = week, 119381 visits in last last2 weeks, 33934 visits this week, Time elapsed: 50.487s
INFO CoreConsole[2015-04-01 07:53:12] Will pre-process for website id = 1, month period, the following 1 segments: { customVariablePageValue1==7 } 
ERROR CoreConsole[2015-04-01 07:55:56] Got invalid response from API request: http://www.pregnant.com/index.php?module=API&method=API.get&idSite=1&period=month&date=last2&format=php&token_auth=removed&trigger=archivephp. Response was 'PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 32 bytes) in /opt/stats.pregnant.com/core/DataTable.php on line 1251 '
INFO CoreConsole[2015-04-01 07:55:56] Archived website id = 1, period = month, 0 visits in last last2 months, 0 visits this month, Time elapsed: 163.198s
INFO CoreConsole[2015-04-01 07:55:56] Will pre-process for website id = 1, year period, the following 1 segments: { customVariablePageValue1==7 } 
ERROR CoreConsole[2015-04-01 07:58:42] Got invalid response from API request: http://www.pregnant.com/index.php?module=API&method=API.get&idSite=1&period=year&date=last2&format=php&token_auth=removed&trigger=archivephp. Response was 'PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 8208 bytes) in /opt/stats.pregnant.com/core/DataTable.php on line 1251 '
INFO CoreConsole[2015-04-01 07:58:42] Archived website id = 1, period = year, 0 visits in last last2 years, 0 visits this year, Time elapsed: 166.460s
INFO CoreConsole[2015-04-01 07:58:42] Archived website id = 1, 8 API requests, Time elapsed: 406.342s [1/1 done]
INFO CoreConsole[2015-04-01 07:58:42] Done archiving!
INFO CoreConsole[2015-04-01 07:58:42] ---------------------------
INFO CoreConsole[2015-04-01 07:58:42] SUMMARY
INFO CoreConsole[2015-04-01 07:58:42] Total visits for today across archived websites: 4363
INFO CoreConsole[2015-04-01 07:58:42] Archived today's reports for 1 websites
INFO CoreConsole[2015-04-01 07:58:42] Archived week/month/year for 1 websites
INFO CoreConsole[2015-04-01 07:58:42] Skipped 0 websites: no new visit since the last script execution
INFO CoreConsole[2015-04-01 07:58:42] Skipped 0 websites day archiving: existing daily reports are less than 150 seconds old
INFO CoreConsole[2015-04-01 07:58:42] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
INFO CoreConsole[2015-04-01 07:58:42] Total API requests: 8
INFO CoreConsole[2015-04-01 07:58:42] done: 1/1 100%, 4363 vtoday, 1 wtoday, 1 wperiods, 8 req, 406424 ms, 2 errors.
INFO CoreConsole[2015-04-01 07:58:42] Time elapsed: 406.425s
INFO CoreConsole[2015-04-01 07:58:42] ---------------------------
INFO CoreConsole[2015-04-01 07:58:42] SCHEDULED TASKS
INFO CoreConsole[2015-04-01 07:58:42] Starting Scheduled tasks... 
INFO CoreConsole[2015-04-01 07:58:43]  No task to run
INFO CoreConsole[2015-04-01 07:58:43] done
INFO CoreConsole[2015-04-01 07:58:43] ---------------------------
INFO CoreConsole[2015-04-01 07:58:43] ---------------------------
INFO CoreConsole[2015-04-01 07:58:43] SUMMARY OF ERRORS
INFO CoreConsole[2015-04-01 07:58:43] Error: Got invalid response from API request: http://www.pregnant.com/index.php?module=API&method=API.get&idSite=1&period=month&date=last2&format=php&token_auth=removed&trigger=archivephp. Response was 'PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 32 bytes) in /opt/stats.pregnant.com/core/DataTable.php on line 1251 '
INFO CoreConsole[2015-04-01 07:58:43] Error: Got invalid response from API request: http://www.pregnant.com/index.php?module=API&method=API.get&idSite=1&period=year&date=last2&format=php&token_auth=removed&trigger=archivephp. Response was 'PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 8208 bytes) in /opt/stats.pregnant.com/core/DataTable.php on line 1251 '
ERROR CoreConsole[2015-04-01 07:58:43] 2 total errors during this script execution, please investigate and try and fix these errors.
ERROR CoreConsole[2015-04-01 07:58:43] 2 total errors during this script execution, please investigate and try and fix these errors.

  [Exception]                                                                                    
  2 total errors during this script execution, please investigate and try and fix these errors.  

core:archive [--url="..."] [--force-all-websites] [--force-all-periods[="..."]] [--force-timeout-for-periods[="..."]] [--skip-idsites[="..."]] [--force-idsites[="..."]] [--force-periods[="..."]] [--force-date-last-n="..."] [--force-date-range[="..."]] [--concurrent-requests-per-website[="..."]] [--disable-scheduled-tasks] [--accept-invalid-ssl-certificate] [--xhprof]
approached commented 9 years ago

Method:

    /**
     * Adds a set of rows from a serialized DataTable string.
     *
     * See {@link serialize()}.
     *
     * _Note: This function will successfully load DataTables serialized by Piwik 1.X._
     *
     * @param string $stringSerialized A string with the format of a string in the array returned by
     *                                 {@link serialize()}.
     * @throws Exception if `$stringSerialized` is invalid.
     */
    public function addRowsFromSerializedArray($stringSerialized)
    {
        require_once PIWIK_INCLUDE_PATH . "/core/DataTable/Bridges.php";

1251:        $serialized = unserialize($stringSerialized);
        if ($serialized === false) {
            throw new Exception("The unserialization has failed!");
        }
        $this->addRowsFromArray($serialized);
    }
approached commented 9 years ago
INFO CoreConsole[2015-04-01 15:01:38] Error: Got invalid response from API request: http://stats.pregnant.com/index.php?module=API&method=API.get&idSite=1&period=month&date=last3&format=php&token_auth=removed&trigger=archivephp. Response was 'PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 8208 bytes) in /opt/stats.pregnant.com/core/DataTable.php on line 1251 '
INFO CoreConsole[2015-04-01 15:01:38] Error: Got invalid response from API request: http://stats.pregnant.com/index.php?module=API&method=API.get&idSite=1&period=year&date=last3&format=php&token_auth=removed&trigger=archivephp. Response was 'PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 130 bytes) in /opt/stats.pregnant.com/core/DataTable.php on line 1251 '
ERROR CoreConsole[2015-04-01 15:01:38] 2 total errors during this script execution, please investigate and try and fix these errors.
DEBUG SitesManager[2015-04-01 15:01:38] Db::fetchAll() executing SQL: SELECT idsite FROM piwik_site
ERROR CoreConsole[2015-04-01 15:01:38] 2 total errors during this script execution, please investigate and try and fix these errors.

  [Exception]                                                                                    
  2 total errors during this script execution, please investigate and try and fix these errors.  

Exception trace:
 () at /opt/stats.pregnant.com/core/CronArchive.php:418
 Piwik\CronArchive->logFatalError() at /opt/stats.pregnant.com/plugins/CoreConsole/Commands/CoreArchiver.php:43
 Piwik\Plugins\CoreConsole\Commands\CoreArchiver->execute() at /opt/stats.pregnant.com/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
 Symfony\Component\Console\Command\Command->run() at /opt/stats.pregnant.com/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /opt/stats.pregnant.com/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at n/a:n/a
 call_user_func() at /opt/stats.pregnant.com/core/Console.php:61
 Piwik\Console->Piwik\{closure}() at /opt/stats.pregnant.com/core/Access.php:454
 Piwik\Access::doAsSuperUser() at /opt/stats.pregnant.com/core/Console.php:62
 Piwik\Console->doRun() at /opt/stats.pregnant.com/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /opt/stats.pregnant.com/console:27
mattab commented 9 years ago

Hi there,

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