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
Limit amount of sites in SitesManager. #5892
Limit amount of sites in SitesManager. #5892
Conversation
Referenced to: #3838 |
Thanks for PR! is there reason you added offset/paging to several APIs ie |
…DB:" This reverts commit 49ae6b4.
…e columns will not be installed
…lnowski/piwik into limiting-and-offseting-sites-manager
After discussing the SitesManager scalability issue during the meet-up, we concluded client side paging could be implemented as a first step. If we later find client side paging does not scale enough, server side paging could be considered. |
We tested SitesManager with 20.000 sites and backend doesn't respond, because of memory limit. For bigger instances of piwik we have implement backend limiting and offseting, as well filtering too. |
@czolnowski was there a memory error from server? because loading 20k websites in an array sounds cheap on memory eg. could fit in 200kb? |
@mattab: Problem is when you want to print this using ResponseBuilder. It cause memory error. |
can you paste the memory error with backtrace? maybe we can make it less memory hungry as it shouldn't cause a memory error I think. |
Here is one of logs from nginx:
And database:
|
Ok so it looks like we have some very inefficient code in there... maybe we need a little XHprof analysis to figure out why and maybe we can find solution! |
Add offset and limit parameter to API methods which is used to fetching sites.