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

autocompletion of custom variable values while creating segment kills database on moderately large site #7277

Closed
ArnY opened this issue Feb 23, 2015 · 4 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Performance For when we could improve the performance / speed of Matomo. duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@ArnY
Copy link
Contributor

ArnY commented Feb 23, 2015

I manage a moderately large site (80 000 pages view and 150 000 actions daily). When creating a custom segment based on a custom variable value, piwik seems to try to suggest a list of value extracted from the database. Unfortunately, one of the sql requests used for this takes more than 10 minutes to accomplish (actually, I never let it finish since i'm always running out of patience) and literally clog my mysql server which completely freeze:

 SELECT sub.* FROM ( SELECT log_inner.* FROM ( SELECT log_visit.* FROM piwik_log_visit AS log_visit LEFT JOIN piwik_log_link_visit_action AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit WHERE ( log_visit.idsite in ('9') AND log_visit.visit_last_action_time >= '2014-12-24 23:00:00' ) AND ( ( log_link_visit_action.custom_var_v3 IS NOT NULL AND (log_link_visit_action.custom_var_v3 <> '' OR log_link_visit_action.custom_var_v3 = 0) ) ) GROUP BY log_visit.idvisit ) AS log_inner ORDER BY idsite, visit_last_action_time DESC LIMIT 0, 400 ) AS sub GROUP BY sub.idvisit ORDER BY sub.visit_last_action_time DESC

Live reports are disabled (by browser_archiving_disabled_enforce=1) in my config file and new segments are always set to be pre-processed (and i have a crontab which trigger core:achive every hour). Knowing my site might be larger than the average, I do everything to tune piwik by pre-processing as much as I can and then this "not so useful" feature I can't disable ruins it all...

@peterbo
Copy link
Contributor

peterbo commented Feb 23, 2015

You can disable the autocompletion feature by setting the config parameter

[General]
enable_segment_suggested_values = 0

Additionally, you can disable the creation of realtime segments as well:

[General]
enable_create_realtime_segments = 0

@peterbo peterbo closed this as completed Feb 23, 2015
@mattab
Copy link
Member

mattab commented Feb 23, 2015

Thanks for report!

re-opening as ideally we should try to not kill the server by default 👍 (not sure how we could do it yet)

@mattab mattab added Bug For errors / faults / flaws / inconsistencies etc. c: Performance For when we could improve the performance / speed of Matomo. labels Feb 23, 2015
@mattab mattab added this to the Short term milestone Feb 23, 2015
@gaumondp
Copy link

Isn't this the same kind of problem as #4253 ?

@mattab
Copy link
Member

mattab commented Feb 23, 2015

Yes it is the same problem, the difference is that one year later we have changed how we work and now we think such bugs are not acceptable and issues can be left opened until we deal with them 👍 See also this blog post for more info.

@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Mar 4, 2015
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. c: Performance For when we could improve the performance / speed of Matomo. duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

4 participants