Visits Log doesn't work since updating to 4.2.1

I installed the update to version 4.2.1 two days ago. Since then I can no longer access the visits log and always get the following error message:

Oops… there was a problem during the request. Maybe the server had a temporary issue, or maybe you requested a report with too much data. Please try again. If this error occurs repeatedly please contact your Matomo administrator for assistance.

Previously I was always able to access it. My browser then sometimes asked me to stop the website, but I was able to view data.

What might be the problem with this?

I got the same error messages after upgrading to 4.2.1. After a couple reloads of the admin page only a 500 error is displayed.

Hi,

Can you both please check your Webserver error log for errors?
If the error is not occuring instantly, but after long loading, it might be that Matomo just takes more time than the max_execution_time set in the PHP config and is aborted.

@Lukas i can’t find anything in my error logs. The error appears about 2 seconds after opening the report.

My visits log still doesn’t work and I have no idea how to solve that problem. I don’t get any error logs and my max_execution_time is set to 30 seconds, but i get the error message in matomo like 2 seconds after opening the report.

Is there anything else I can do? I really need this to work again.

Hi,

Maybe also check https://matomo.org/faq/how-to/faq_20991/ for errors. Or look in the network tab of the browser developer tools to see how exactly the requests are failing

1 Like

Thank you @Lukas! In the network tab I found the following error message:

A fatal error occurred
The following error just broke Matomo (v4.2.1): 
An exception has been thrown during the rendering of a template ("Unable to write in the cache directory (/piwik/tmp/templates_c/9e).").
in /piwik/plugins/CoreHome/templates/_dataTable.twig line 68

I changed the owner of the templates_c folder and now everything works fine :slight_smile:

1 Like

@Lukas
i got the same error, but the owner and user is correct. I think it was happend with 4.2.1. Before everything works fine

[Mon May 17 09:44:05.728620 2021] [proxy_fcgi:error] [pid 15425:tid 140103150159616] [client 80.187.96.xx:13547] AH01071: Got error 'PHP message: Error in Matomo: Unable to write in the cache directory (/var/www/vhosts/xyz/httpdocs/matomo4-2/tmp/templates_c/f9).', referer: https://xyz/index.php?module=CoreAdminHome&action=home&idSite=9&period=day&date=today

Old <4.x

New > 4.x

If i click on “Administration” i got:

# Mandatory checks

## PHP-Version >= 7.2.5: ✔ 7.4.18


## PDO Erweiterung: ✔ 


## PDO\MYSQL Erweiterung: ✔ 


## MYSQLI Erweiterung: ✔ 


## Weitere erforderliche Anforderungen: ✔ zlib ✔ SPL ✔ iconv ✔ json ✔ mbstring ✔ Reflection


## Erforderliche Funktionen: ✔ debug_backtrace ✔ eval ✔ hash ✔ gzcompress ✔ gzuncompress ✔ pack


## Benötigte PHP Konfiguration (php.ini): ✔ session.auto_start = 0 ✔ max_execution_time = 0 OR >= 30


## Verzeichnisse mit Schreibzugriff: ✔ $DOC_ROOT/tmp ✔ $DOC_ROOT/tmp/assets ✔ $DOC_ROOT/tmp/cache ✔ $DOC_ROOT/tmp/climulti ✔ $DOC_ROOT/tmp/latest ✔ $DOC_ROOT/tmp/logs ✔ $DOC_ROOT/tmp/sessions ✔ $DOC_ROOT/tmp/tcpdf ✔ $DOC_ROOT/tmp/templates_c



# Optional checks

## Dateiintegrität: ⚠ Warning: Der Datei-Integritätscheck ist fehlgeschlagen und hat ein paar Fehler gemeldet. Du solltest die Probleme beheben und diese Seite neuladen, bis sie keine Fehler mehr anzeigt.<br/><br/><pre style="overflow-x: scroll;max-width: 600px;">Es wurden unerwartete Dateien in Ihrer Matomo-Installation gefunden.<br/>--> Bitte löschen Sie diese Dateien, um Fehler zu vermeiden. <--<br/><br/>Zu löschende Datei: log/cron-matomo-archive.log<br/>Zu löschende Datei: .htpasswd<br/><br/><br/>Um alle diese Dateien auf einmal zu löschen, kannst du folgenden Befehl ausführen:<br/>rm "$DOC_ROOT/log/cron-matomo-archive.log" "$DOC_ROOT/.htpasswd"<br/><br/>
Die nachfolgenden Fehler könnten durch einen teilweise oder gänzlich fehlgeschlagenen Upload der Matomo-Dateien entstanden sein.
--> Versuche die Matomo-Dateien im BINARY-Modus neu hochzuladen. <--<br/>
Unterschiedliche Dateigröße: $DOC_ROOT/robots.txt (erwartete Größe: 744, gefunden: 515)</pre>


## Tracker-Status: ✔ 


## Speicherlimit: ✔ 4096M


## Zeitzone: ✔ 


## Öffnen einer URL: ✔ curl


## PageSpeed deaktiviert: ✔ 


## GD > 2.x + Freetype (graphics): ✔ 


## Andere Erweiterungen: ✔ json ✔ libxml ✔ dom ✔ SimpleXML


## Andere Funktionen: ✔ shell_exec ✔ set_time_limit ✔ mail ✔ parse_ini_file ✔ glob ✔ gzopen ✔ md5_file


## Dateisystem: ✔ 


## Cron einrichten - Prozesse via CLI steuern: ✔ OK


## Letzter erfolgreicher Abschluss der Archivierung: ✔ Der Archivierungsprozess wurde vor 00:19:58 erfolgreich abgeschlossen.


## Datenbankfähigkeiten: ✔ UTF8mb4 charset ✔ LOAD DATA INFILE ✔ CREATE TEMPORARY TABLES ✔ Changing transaction isolation level


## Maximale Packetgröße: ✔ 


## Erzwungene SSL Verbindung: ✔ 


## Standorterkennung: ✔ 


## Update über HTTPS: ✔ 


## Schreibbarer JavaScript-Tracker ("/matomo.js"): ✔ 


## [GoogleAnalyticsImporter] Benötigte PHP Funktionen: ✔ 


## [GoogleAnalyticsImporter] Benötigte Entscheidungen (php): ✔ 


## [GoogleAnalyticsImporter] Benötigte Entscheidungen (nohup): ✔ 



# Informational results

## Matomo Version: 4.2.1


## Matomo Update History: 3.14.1,


## Matomo Install Version: 3.13.0


## Latest Available Version: 4.3.0


## Is Git Deployment: 0


## PHP_OS: Linux


## PHP_BINARY: /opt/plesk/php/7.4/sbin/php-fpm


## PHP SAPI: fpm-fcgi


## Timezone Version: 0.system


## PHP Timezone: UTC


## PHP Time: 1621246858


## PHP Datetime: 2021-05-17 10:20:58


## PHP Disabled functions: opcache_get_status


## PHP INI max_execution_time: 60


## PHP INI post_max_size: 16M


## PHP INI max_input_vars: 10000


## PHP INI zlib.output_compression: 


## Curl Version: 7.58.0, OpenSSL/1.1.1


## Suhosin Installed: 0


## DB Prefix: matomo_286_ST


## DB Charset: utf8mb4


## DB Adapter: PDO\MYSQL


## MySQL Version: 10.1.48-MariaDB-0ubuntu0.18.04.1


## Num Tables: 490


## Browser Segment Archiving Enabled: 1


## Development Mode Enabled: 0


## Internet Enabled: 1


## Multi Server Environment: 0


## Auto Update Enabled: 1


## Custom User Path: 0


## Custom Include Path: 0


## Release Channel: latest_stable


## Plugins Activated: API, Actions, Annotations, BulkTracking, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CustomDimensions, CustomJsTracker, CustomVariables, Dashboard, DevicePlugins, DevicesDetection, Diagnostics, Ecommerce, Events, Feedback, GeoIp2, Goals, GoogleAnalyticsImporter 4.1.3, Heartbeat, ImageGraph, Insights, Installation, Intl, IntranetMeasurable, InvalidateReports 4.0.1, LanguagesManager, Live, Login, Marketplace, MobileMessaging, Monolog, Morpheus, MultiSites, Overlay, PagePerformance, PrivacyManager, ProfessionalServices, Proxy, Referrers, Resolution, RssWidget, SEO, ScheduledReports, SegmentEditor, SitesManager, Tour, Transitions, TwoFactorAuth, UserCountry, UserCountryMap, UserId, UserLanguage, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable, Widgetize


## Plugins Deactivated: DBStats, MobileAppMeasurable, Provider, TagManager


## Plugins Invalid: 


## Server Info: Apache


## Had visits in last 1 day: 1


## Had visits in last 3 days: 1


## Had visits in last 5 days: 1


## Archive Time Last Started: 1621245602


## Archive Time Last Finished: 1621245659


## Num invalidations: 0 queued, 0 in progress


## User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0


## Browser Language: de,en-us,en


## Anonymize Referrer: 


## Do Not Track enabled: 1



Hi @Miches,

Can you make sure Matomo can actually write there?
e.g. by writing a file there as the user of your webserver (sudo -u www-data touch testfile or ... mkdir testdirectory)

Hi @Lukas

I did that:

Rename the folder - reolad matomo and look, there is a new directory with one file:

Directory 61:

So i think: yes, matomo can write