By default, Matomo (Piwik) uses files to store session data. These files are located in the tmp/sessions folder under your Matomo directory. Where file-based session storage may be insecure (e.g., in some shared hosting environments) or where you have to share session data between servers (e.g., load balanced web servers), you can instead use the database to store session data. In config/config.ini.php, under the [General] section (add this section if it doesn’t already exist):
session_save_handler = dbtable
Note: If you have many concurrent dashboard users, you may need to increase the max number of client connections to the database server.
Related: Matomo (Piwik) widgets should load very fast as Matomo is designed for speed. If your widgets load slowly, maybe your server runs on slow NFS disks? This setting will make widgets fast again.