Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Archivejob: Adding a subtable to the row, but it already has a subtable associated #4528

Closed
anonymous-matomo-user opened this issue Jan 15, 2014 · 12 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

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
Copy link
Member

mattab commented Jan 15, 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-matomo-user
Copy link
Author

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
Copy link
Member

mattab commented Mar 16, 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-matomo-user
Copy link
Author

http://pastebin.com/9H9C4kZ0

We are not using custom plugins.

@mattab
Copy link
Member

mattab commented Mar 24, 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-matomo-user
Copy link
Author

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

@mattab
Copy link
Member

mattab commented May 6, 2014

It was also reported in #5087 - increasing priority

@anonymous-matomo-user
Copy link
Author

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

@quba
Copy link
Contributor

quba commented Aug 27, 2014

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

@mattab mattab added the Major label Aug 27, 2014
@mattab
Copy link
Member

mattab commented Aug 27, 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 mattab modified the milestones: Short term, Piwik 2.7.0 Aug 28, 2014
@mattab mattab added Critical Indicates the severity of an issue is very critical and the issue has a very high priority. and removed Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. labels Sep 15, 2014
@mattab
Copy link
Member

mattab commented Oct 2, 2014

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

@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Oct 2, 2014
@mattab
Copy link
Member

mattab commented Oct 13, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants