@anonymous-piwik-user opened this issue on January 15th 2014

Hi,

my archivejob ist not working with several sites: (only the large sites?)

Error: Got invalid response from API request: http://xxx.yyy.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=6&period=year&date=last3&format=php&token_auth=c8b5f7df73cd9cd49f9b0cca2e0728b8&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:71:"Adding a subtable to the row, but it already has a subtable associated.";}' 1 total errors during this script execution, please investigate and try and fix these errors

Piwik Version 2.0.3 PHP 5.4.24-1

Apache error log is empty.

SH28 Keywords: archive job

@mattab commented on January 15th 2014

Thanks for the report. can you add debug_print_backtrace(); before the throw exception at line 299 in core/DataTable/Row.php and put the output here? it will help figure out.

Then to temporarily hot fix the issue simply comment out the throw new exception line.

@anonymous-piwik-user commented on January 15th 2014
ERROR: Got invalid response from API request: http://xxx.yyy.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=6&period=year&date=last4&format=php&token_auth=c8b5f7df73cd9cd49f9b0cca2e0728b8&trigger=archivephp. Response was '#0  Piwik\DataTable\Row->addSubtable(Piwik\DataTable Object ([=> Array (),[](]) => 24853,[=> 0,[](]) => 1,[=> ,[](]) => ,[=> Array (),[](]) => 0,[=> ,[](]) => ,[=> Array (),[](]) => ,[=> Array (),[](]) => 0)) called at [/xxx/piwik/core/DataTable/Row.php:282]
#1  Piwik\DataTable\Row->sumSubtable(Piwik\DataTable Object ([=> Array ([0](]) => Piwik_DataTable_Row Object ([=> Array ([0](c]) => Array ([=> /index.html,[2](label]) => 1,[=> 1,[13](12]) => 76,[=> 1),[1](11]) => Array ([=> http://www.xxx.com/index.html),[3](url]) => ),[=> ,[maxVisitsSummed](]) => 0)),[=> 9015,[](]) => 0,[=> 1,[](]) => ,[=> ,[](]) => Array (),[=> 0,[](]) => ,[=> ,[](]) => Array (),[=> ,[](]) => Array ([=> Array ([33](column_aggregation_ops]) => max,[=> min)),[](32]) => 0)) called at [/xxx/piwik/core/DataTable.php:1613]
#2  Piwik\DataTable->aggregateRowWithLabel(Piwik_DataTable_Row_DataTableSummary Object ([=> Array ([0](c]) => Array ([=> -1,[2](label]) => 1,[=> 1,[13](12]) => 18),[=> Array (),[3](1]) => 9015),[=> ,[maxVisitsSummed](]) => 0)) called at [/xxx/piwik/core/DataTable.php:486]
#3  Piwik\DataTable->addDataTable(Piwik\DataTable Object ([=> Array ([0](]) => Piwik_DataTable_Row_DataTableSummary Object ([=> Array ([0](c]) => Array ([=> 1175357_l1,[2](label]) => 4,[=> 6,[13](12]) => 168,[=> 3,[19](15]) => 2,[=> 4,[21](20]) => 22,[=> 1),[1](22]) => Array (),[=> -3844),[](3]) => ,[=> 0),[1](maxVisitsSummed]) => Piwik_DataTable_Row_DataTableSummary Object ([=> Array ([0](c]) => Array ([=> 1175252_l1,[2](label]) => 8,[=> 10,[13](12]) => 139,[=> 4,[19](15]) => 6,[=> 18,[21](20]) => 476,[=> 3),[1](22]) => Array (),[=> -3845),[](3]) => ,[=> 0),[2](maxVisitsSummed]) => Piwik_DataTable_Row_DataTableSummary Object ([=> Array ([0](c]) => Array ([=> 1174588_l1,[2](label]) => 6,[=> 7,[13](12]) => 713,[=> 2,[20](19]) => 5,[=> 625,[22](21]) => 1,[=> 2),[1](15]) => Array (),[=> -3846),[](3]) => ,[=> 0),[3](maxVisitsSummed]) => Piwik_DataTable_Row_DataTableSummary Object ([=> Array ([0](c]) => Array ([=> 1181115_l1,[2](label]) => 9,[=> 13,[13](12]) => 208,[=> 2),[1](15]) => Array (),[=> -3847),[](3]) => ,[=> 0),[4](maxVisitsSummed]) => Piwik_DataTable_Row_DataTableSummary Object ([=> Array ([0](c]) => Array ([=> 1175066_l1,[2](label]) => 3,[=> 5,[13](12]) => 61),[=> Array (),[3](1]) => -3848),[=> ,[maxVisitsSummed](]) => 0),[=> Piwik_DataTable_Row_DataTableSummary Object ([c](5]) => Array ([=> Array ([label](0]) => 1456573_l1,[=> 20,[12](2]) => 23,[=> 603,[19](13]) => 15,[=> 145,[21](20]) => 3700,[=> 2,[15](22]) => 3),[=> Array (),[3](1]) => -3849),[=> ,[maxVisitsSummed](]) => 0),[=> Piwik_DataTable_Row_DataTableSummary Object ([c](6]) => Array ([=> Array ([label](0]) => -1_l1,[=> 3,[12](2]) => 3,[=> 11,[15](13]) => 2,[=> 1,[20](19]) => 1,[=> 0,[22](21]) => 1),[=> Array (),[3](1]) => -3850),[=> ,[maxVisitsSummed](]) => 0),[=> Piwik_DataTable_Row_DataTableSummary Object ([c](7]) => Array ([=> Array ([label](0]) => 1179280_l1,[=> 2,[12](2]) => 2,[=> 51),[1](13]) => Array (),[=> -3851),[](3]) => ,[=> 0),[8](maxVisitsSummed]) => Piwik_DataTable_Row_DataTableSummary Object ([=> Array ([0](c]) => Array ([=> 1174563_l1,[2](label]) => 1,[=> 1,[13](12]) => 0,[=> 1),[1](15]) => Array (),[=> -3852),[](3]) => ,[=> 0),[9](maxVisitsSummed]) => Piwik_DataTable_Row_DataTableSummary Object ([=> Array ([0](c]) => Array ([=> 1292930_l1,[2](label]) => 1,[=> 1,[13](12]) => 28,[=> 1,[20](19]) => 2,[=> 29,[22](21]) => 0),[=> Array (),[3](1]) => -3853),[=> ,[maxVisitsSummed](]) => 0),[=> Piwik_DataTable_Row_DataTableSummary Object ([c](10]) => Array ([=> Array ([label](0]) => 1175222_l1,[=> 1,[12](2]) => 1,[=> 725,[19](13]) => 1,[=> 2,[21](20]) => 726,[=> 0),[1](22]) => Array (),[=> -3854),[](3]) => ,[=> 0),[11](maxVisitsSummed]) => Piwik_DataTable_Row_DataTableSummary Object ([=> Array ([0](c]) =>
@mattab commented on March 16th 2014

@sh_28 thanks for this, unfortunately the error message was only partial. can you please open the URL http://xxx.yyy.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=6&period=year&date=last4&format=php&token_auth=c8b5f7df73cd9cd49f9b0cca2e0728b8&trigger=archivephp (after making the patch) and copy paste the full output that is displayed there? please post it on pastebin.com

seeing the full error will help us understand what code triggers this error. Then I think we can fix it by adding a catch block at the right place.

btw Do you use any custom plugin?

@anonymous-piwik-user commented on March 18th 2014

http://pastebin.com/9H9C4kZ0

We are not using custom plugins.

@mattab commented on March 24th 2014

That's not the error message but just a valid API response. If you have the full error message once more, please post it here!

@anonymous-piwik-user commented on May 5th 2014

I have the same problem, here's the pastebin: http://pastebin.com/0CrMuTwF

@mattab commented on May 6th 2014

It was also reported in #5087 - increasing priority

@anonymous-piwik-user commented on June 18th 2014

same problem here. pastbin: http://pastebin.com/Y9hyzu2w

@quba commented on August 27th 2014

@mattab: we were able to reproduce this issues several times (mostly on bigger instances - about 200k visits daily).

@mattab commented on August 27th 2014

@quba added a tag Major to ticket. It would be really helpful if we could find steps to reproduce the issue. Maybe you have some idea how it could be reproduced?

@mattab commented on October 2nd 2014

still cannot reproduce the issue unfortunately, so it's tricky to fix that one :(

@mattab commented on October 13th 2014

Note to self: when users report info on pastebin. copy to ticket as pastebin expire after a while :-1:

This issue was closed on October 13th 2014
Powered by GitHub Issue Mirror