Typical Error Message: mmap() failed: [12] Cannot allocate memory PHP Fatal error: Out of memory (allocated 94896128) (tried to allocate 35651616 bytes) in /var/www/littlefurnace.com/matomo/vendor/pear/archive_tar/Archive/Tar.php on line 1907 Remedy: #1 Find where the file is for your PHP settings. The location is variable. PHP language is installed in the same machine where your web server for Matomo is running. Look up how to run phpinfo(). This pink and blue page will show the location of your PHP settings: #2 Now look inside that file. Find the memory setting. Change it to something like memory_limit = 2G
$ head /etc/php/8.2/fpm/php.ini $ grep memory /etc/php/8.2/fpm/php.ini $ sudo nano /etc/php/8.2/fpm/php.ini $ sudo systemctl restart apache2
0 Comments
See examples of tracking code in the HTML source code of these: https://pikl.us https://littlefurnace.com https://tatll.me https://genest.weebly.com The last link above is using a tracking pixel. Enable debug logging on Matomo Tracking API
Symptoms: An event fires in the browser when someone visits your website, but nothing reaches the Matomo dashboard First check with devtools in the browser to see whether the event is firing in the Network tab. It may be convenient to send a manual event through to test this (replace example.com with the URL of where you send your Matomo traffic) : https://example.com/matomo/matomo.php?rec=1&idsite=123&new_visit=1 or a more realistic event is this URL. I recycled it by opening Devtools >> Network tab to eavesdrop on some tracking requests that occurred while I browsed a real site: https://littlefurnace.com/matomo/matomo.php?action_name=Evan%20Genest%20Web%20Developer%20homepage&idsite=1&rec=1&r=481840&h=8&m=34&s=7&url=https%3A%2F%2Flittlefurnace.com%2F&_id=d89e5d692dfdba06&_idn=0&send_image=0&_refts=1698068037&_ref=https%3A%2F%2Ft.co%2F&pdf=1&qt=0&realp=0&wma=0&fla=0&java=0&ag=0&cookie=1&res=2859x1206&pv_id=mfktev&pf_net=0&pf_srv=59&pf_tfr=0&pf_dm1=106&uadata=%7B%7D If you can send these and you see no error in either the browser or the web server where your Matomo is running (look for a PHP error) you can see what the heck is Matomo doing once the request arrives at the Matomo server but fails to end up in your dashboard. Hypothesis: Something goes wrong inside the tracker as Matomo tries to receive it. Sleuth this by turning on debug logging on Matomo Tracking API. This logging is too verbose to keep on all day, all week long. Caveat: besides being too verbose to leave enabled for long, it is also a bit of a security risk: it doesn't show secrets but it reveals details which modules and methods are being used on the Matomo backend. To check what is preventing the data from being tracked properly, you can enable debug logging in the Matomo tracking API (matomo.php) In debug mode, Tracking requests will output the tracking log messages in readable english, and it will clearly say any issue or reason why the request is not being tracked. For security reasons, this should not be done in production or only for a very short time frame. Follow these steps to enable and view debug logging for the tracker:
[Tracker] debug_on_demand = 1 In this case messages will be only logged for Tracker requests that have a URL parameter &debug=1 set. This is considered more secure but should be still only enabled for a short time frame. Enable debug logging on Matomo Tracking API Checklist for swimming in the deep water with Matomo |
Troubleshooting + Deploying Matomo
Archives
December 2024
Categories |