OpenCms stores binary data such as gallery images in its database tables. MySQL's and MariaDB's default
max_allowed_packet setting is chosen too conservatively for OpenCms. You MUST increase this value so that images and other binary files can be saved.
This page describes some recommended settings for the database server used by OpenCms. Currently, we only have recommended settings for MySQL/MariaDB.
MySQL's / MariaDB's query cache can significantly improve the page load times of an OpenCms installation. For older versions of MySQL / MariaDB, the query cache was switched on by default, in newer versions it is switched off. Thus, it is worth checking the query cache settings for your OpenCms database.
Relevant Query Cache Settings
Please refer to the MySQL / MariaDB documentation for a detailed description of all available query cache settings.
The following settings are only relevant when using MySQL/MariaDB with InnoDB as the storage engine for the OpenCms tables. Prior to OpenCms 12, the tables would be automatically created with MyISAM as the storage engine, but from OpenCms 12 onward, no storage engine is specified, so the default storage engine is used, which is usually InnoDB.
For more detailed information about these settings, refer to the MySQL or MariaDB documentation.
This controls when the InnoDB redo logs are flushed. By default, this is set to 1, which flushes them after every transaction for safety and can cause bad write performance. Set it to 0 or 2 instead.
Controls the size of the InnoDB buffer pool, which is used for caching data. The MySQL documentation recommends a size of 80% of available memory for a dedicated database server. This benefits both read and write operations.