Quick solution, reducing mem usage: Page-Title Length (1st idea)

Hello!

Very good support forum. Special Thanks to Matt! You are doing an excellent job!

I am searching for quick solutions to reduce the tracked data and avoid “Out of memory” when running Piwik archiving (before the code optimizations from Archiving Memory exhausted error - Archiving memory leaks · Issue #766 · matomo-org/matomo · GitHub are realized).

My idea: Reducing the Page-Title Length
Our Situation: The Page-Title always includes the full Website-Name (20 character). It’s not necessary that the Website-Name appear in piwik and in DB-Table log_action (field “name” – type “4”). Without the Website-Name we reduce the title length 30-40 %.
My Questions:

  1. Could this possibly reduce the archive-mem-usage more than 5%?
  2. Is this the best way to realize it:
    Add “piwikTracker.setDocumentTitle(“”) to the Tracking code?
  3. Is it okay to rename the page title (field “name”) in table “log_action” in all existing records?
  4. Where can I find the code to rebuild the hash (field “hash”) in table “log_action”?

Thanks, Micha

When it comes to memory optimization, i wonder if updating to a newer version of php and python would help?

I have no idea which you use but on the php 5.4 side I have seen some here on the forums comment on how it improved speed. What are you running now?

Hello Lesjokolat, many thanks for your help. In our case it’s the same with PHP 5.4. : Php-Error “Out of memory” when running Piwik archiving. I already use the max “memory_limit“ (php.ini) which is allowed on the shared server.

Hi your welcome. Ok that memory error can you check sushosin memory limit (if applicable)? Are you using fastcgi? What python version are you using?

Thank you. :slight_smile: With fastcgi archiving is a bit faster (day-archiving from 96s to 91s) but same “Out of memory” during “month archiving”. We don’t use Suhosin or Python.

Do you think a short title in table “log_action” can reduce archive-mem usage?
Can you help me with my questions above? :slight_smile:

If its just the title and by 20 characters etc then perhaps when it involves millions of pages or error messages but i think the problem is something else here…

Can you check your web server error logs and see what is showing up?

With fastcgi you can also adjust the timeout settings. Is your server a windows or linux based one?