Reports show no data - Error establishing a database connection

My installation and Auto archiving were working fine untill 28th feb, then started to see the error below.

Note:

  1. Real time is working fine
  2. Manual Archive Reports option in Troubleshooting also works fine. After executing this a can see data.

can you plz help? .

Matomo

  • Matomo Plugin Version: 4.12.0
  • Config exists and is writable.: Yes (“$abs_path/uploads_share/novo/matomo/config/config.ini.php” )
  • JS Tracker exists and is writable.: Yes (“$abs_path/uploads_share/novo/matomo/matomo.js” )
  • Plugin directories: Yes ([{“pluginsPathAbsolute”:“$abs_path/wp-content/plugins/matomo/plugins”,“web$DB_USERDirRelativeToMatomo”:“…/”}])
  • Tmp directory writable: Yes ($abs_path/wp-content/cache/matomo)
  • Matomo Version: 4.12.3
  • Matomo Blog idSite: 1
  • Matomo Install Version: 4.12.0 (Install date: 2022-12-05 08:59:07)
  • Upgrades outstanding: No
  • Upgrade in progress: No

Endpoints

  • Matomo JavaScript Tracker URL: ($site_url/uploads_share/novo/matomo/matomo.js)
  • Matomo JavaScript Tracker - WP Rest API: ($site_url/wp-json/matomo/v1/hit/)
  • Matomo HTTP Tracking API: ($site_url/wp-content/plugins/matomo/app/matomo.php)
  • Matomo HTTP Tracking API - WP Rest API: ($site_url/wp-json/matomo/v1/hit/)

Crons

  • Server time: 2023-03-12 18:55:53
  • Blog time: 2023-03-12 19:55:53 (Below dates are shown in blog timezone)
  • Sync users & sites: Next run: 2023-03-08 08:46:13 (-4 dias 11 horas) ( Last started: 2023-03-06 14:33:06 (-6 dias 5 horas). Last ended: 2023-03-06 14:33:06 (-6 dias 5 horas). Interval: daily)
  • Archive: Next run: 2023-03-08 08:46:13 (-4 dias 11 horas) ( Last started: 2023-03-06 15:35:47 (-6 dias 4 horas). Last ended: 2023-03-06 15:35:49 (-6 dias 4 horas). Interval: hourly)
  • Update GeoIP DB: Next run: 2023-03-08 08:46:13 (-4 dias 11 horas) ( Last started: 2023-02-08 13:22:36 (-32 dias 6 horas). Last ended: 2023-02-08 13:22:41 (-32 dias 6 horas). Interval: matomo_monthly)

Mandatory checks

  • Versão de PHP >= : ok
  • PDO extensão: ok
  • PDO\MYSQL extensão: ok
  • MYSQLI extensão: ok
  • Outras extensões necessárias: ok
  • Funções necessárias: ok
  • Configuração de PHP obrigatória (php.ini): ok
  • Diretórios com permissão de escrita: ok
  • Diretórios com acesso de escrita para Gestor de tags: ok

Optional checks

  • Binário de 64 bits do PHP: ok
  • Estado do acompanhamento: ok
  • Limite de memória: ok
  • Fuso horário: ok
  • Abrir endereço: ok
  • PageSpeed desativado: ok
  • GD > 2.x + Freetype (gráficos): ok
  • Outras extensões: ok
  • Outras funções: ok
  • Sistema de ficheiros: ok
  • Última conclusão do processo de arquivamento: ok
  • Capacidades da base de dados: ok
  • Tamanho máximo do pacote: ok
  • Geolocalização: ok
  • Atualização sob HTTPS: ok
  • Supports Async Archiving: No
  • Location provider ID: geoip2php
  • Location provider available: Yes
  • Location provider working: Yes
  • Had visit in last 5 days: Yes
  • Matomo URL: Yes ($site_url/wp-content/plugins/matomo/app/)

Matomo Settings

  • Track mode: default
  • Track codeposition: footer
  • Track api endpoint: default
  • Track js endpoint: default
  • Version history: 4.12.0
  • Core version: 4.12.3
  • Last tracking settings update: 1678181783
  • Last settings update: 1678181783
  • Track ecommerce: No

Logs

  • Warning archive_main: 2023-03-06 15:11:31 (24 total errors during this script execution, please investigate and try and fix these errors. => CronArchive.php:625; CronArchive.php:618; CronArchive.php:280; Access.php:670; CronArchive.php:284; ScheduledTasks.php:332; class-wp-hook.php:284; class-wp-hook.php:310; plugin.php:515; wp-cron.php:126;)
  • Warning archive_errors: 2023-03-06 15:11:31 (‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-06&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-06&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2023-03-06&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2023-03-06&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-05&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-05&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-04&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-04&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-03&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-03&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-02&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-02&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-01&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-01&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2023-03-01&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2023-03-01&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-02-28&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-02-28&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2023-02-27&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2023-02-27&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2023-02-01&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2023-02-01&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2023-01-01&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2023-01-01&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘24 total errors during this script execution, please investigate and try and fix these errors.’ => ScheduledTasks.php:345; class-wp-hook.php:284; class-wp-hook.php:310; plugin.php:515; wp-cron.php:126;)
  • Warning archive_main: 2023-03-06 15:35:49 (24 total errors during this script execution, please investigate and try and fix these errors. => CronArchive.php:625; CronArchive.php:618; CronArchive.php:280; Access.php:670; CronArchive.php:284; ScheduledTasks.php:332; class-wp-hook.php:284; class-wp-hook.php:310; plugin.php:515; wp-cron.php:126;)
  • Warning archive_errors: 2023-03-06 15:35:49 (‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-06&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-06&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2023-03-06&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2023-03-06&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-05&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-05&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-04&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-04&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-03&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-03&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-02&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-02&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-01&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-03-01&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2023-03-01&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2023-03-01&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-02-28&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2023-02-28&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2023-02-27&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2023-02-27&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2023-02-01&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2023-02-01&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2023-01-01&format=json&trigger=archivephp. Response was ' Database Error

    Error establishing a database connection

    '’ ‘Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2023-01-01&format=json&trigger=archivephp: ' Database Error

    Error establishing a database connection

    '’ ‘24 total errors during this script execution, please investigate and try and fix these errors.’ => ScheduledTasks.php:345; class-wp-hook.php:284; class-wp-hook.php:310; plugin.php:515; wp-cron.php:126;)
  • update_geoip2: 2023-03-08 10:19:21 (GeoIP2AutoUpdater: failed to download ‘https://download.db-ip.com/free/dbip-city-lite-2023-03.mmdb.gz’ to ‘$abs_path/wp-content/cache/matomo/latest/DBIP-City.mmdb.gz.download’: Error while fetching data: cURL error 28: Resolving timed out after 10000 milliseconds => GeoIP2AutoUpdater.php:176; GeoIP2AutoUpdater.php:106; ScheduledTasks.php:238; SystemReport.php:184; SystemReport.php:220; class-wp-hook.php:308; class-wp-hook.php:332; plugin.php:517; admin.php:259;)
  • update_geoip2: 2023-03-12 18:46:21 (GeoIP2AutoUpdater: failed to download ‘https://download.db-ip.com/free/dbip-city-lite-2023-03.mmdb.gz’ to ‘$abs_path/wp-content/cache/matomo/latest/DBIP-City.mmdb.gz.download’: Error while fetching data: cURL error 28: Resolving timed out after 10000 milliseconds => GeoIP2AutoUpdater.php:176; GeoIP2AutoUpdater.php:106; ScheduledTasks.php:238; SystemReport.php:184; SystemReport.php:220; class-wp-hook.php:308; class-wp-hook.php:332; plugin.php:517; admin.php:259;)

WordPress

  • Home URL: $site_url
  • Site URL: $site_url
  • WordPress Version: 6.1.1
  • Number of blogs: 1
  • Multisite Enabled: No
  • Network Enabled: No
  • WP_DEBUG: Yes
  • WP_DEBUG_DISPLAY: No
  • WP_DEBUG_LOG: Yes
  • DISABLE_WP_CRON: -
  • FORCE_SSL_ADMIN: Yes
  • WP_CACHE: No
  • CONCATENATE_SCRIPTS: -
  • COMPRESS_SCRIPTS: -
  • COMPRESS_CSS: -
  • ENFORCE_GZIP: -
  • WP_LOCAL_DEV: -
  • WP_CONTENT_URL: $site_url/wp-content
  • WP_CONTENT_DIR: $abs_path/wp-content
  • UPLOADS: uploads_share/novo
  • BLOGUPLOADDIR: -
  • DIEONDBERROR: -
  • WPLANG: en_US
  • ALTERNATE_WP_CRON: -
  • WP_CRON_LOCK_TIMEOUT: 60
  • WP_DISABLE_FATAL_ERROR_HANDLER: -
  • MATOMO_SUPPORT_ASYNC_ARCHIVING: No
  • MATOMO_TRIGGER_BROWSER_ARCHIVING: -
  • MATOMO_ENABLE_TAG_MANAGER: -
  • MATOMO_SUPPRESS_DB_ERRORS: -
  • MATOMO_ENABLE_AUTO_UPGRADE: -
  • MATOMO_DEBUG: -
  • MATOMO_SAFE_MODE: -
  • MATOMO_GLOBAL_UPLOAD_DIR: -
  • MATOMO_LOGIN_REDIRECT: -
  • Permalink Structure: /%postname%/
  • Possibly uses symlink: No
  • Upload base url: $site_url/uploads_share/novo
  • Upload base dir: $abs_path/uploads_share/novo
  • Upload url: $site_url/uploads_share/novo/2023/03
  • Custom upload_path:
  • Custom upload_url_path:
  • Compatible content directory: Yes

WordPress Plugins

  • Advanced Custom Fields PRO: 5.12.2
  • Akismet Anti-Spam: 4.1.2
  • Export Import Menus: 1.8.0
  • FakerPress: 0.5.3
  • Fancy Admin UI: 2.1
  • Gutenberg: 6.1.1
  • Matomo Analytics - Ethical Stats. Powerful Insights.: 4.12.0
  • Multiple Post Thumbnails: 1.7
  • WordPress Importer: 0.7
  • Active Plugins: 4 (advanced-custom-fields-pro matomo multiple-post-thumbnails wordpress-importer)
  • Theme: unitel (unitel)

Server

  • Server Info: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1g
  • PHP OS: Linux
  • PHP Version: 7.4.33
  • PHP SAPI: fpm-fcgi
  • PHP Binary Name: php-fpm
  • PHP Error Reporting: 0 After bootstrap: 0
  • PHP Found Binary: php -q
  • Timezone: UTC
  • WP timezone: Africa/Luanda
  • Locale: pt_PT_ao90
  • User Locale: pt_PT_ao90
  • Memory Limit: 256M (At least 128MB recommended. Depending on your traffic 256MB or more may be needed.)
  • WP Memory Limit: 40M
  • WP Max Memory Limit: 256M
  • Timezone version: 2021.1
  • Time: 1678647353
  • Max Execution Time: 30
  • Max Post Size: 8M
  • Max Upload Size: 2097152
  • Max Input Vars: 1000
  • Disabled PHP functions: No
  • zlib.output_compression is off: Yes
  • Curl Version: 7.61.1, OpenSSL/1.1.1g
  • Suhosin installed: No

Database

  • MySQL Version: 8.0.13
  • Mysqli Connect: Yes
  • Force MySQL over Mysqli: No
  • DB Prefix: wp_
  • DB CHARSET: utf8mb4
  • DB COLLATE:
  • SHOW ERRORS: No
  • SUPPRESS ERRORS: No
  • Uses Socket: No
  • Uses IPv6: No
  • Matomo tables found: 285
  • DB tables exist: Yes
  • Matomo users found: 13
  • Matomo sites found: 1
  • Required permissions: OK

Browser

  • Browser: (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.63)
  • Warning Browser Compatibility: Yes (Because you are using MS Edge browser, you may see a warning like “This site has been reported as unsafe” from “Microsoft Defender SmartScreen” when you view the Matomo Reporting, Admin or Tag Manager page. This is a false alert and you can safely ignore this warning by clicking on the icon next to the URL (in the address bar) and choosing either “Report as safe” (preferred) or “Show unsafe content”. We are hoping to get this false warning removed in the future.)
  • Language: en-us,en

Hi @levy06, can you please review: https://github.com/matomo-org/matomo-for-wordpress/issues/762
And provide an update as requested.