Default behavior changes to the Database Upgrade Tool
Based on feedback from our users, we have made some changes to the default behavior of the Database Upgrade Tool to improve usability and performance of the upgrade process.
-
The default maximum heap memory has been doubled from 2048 MB to 4096 MB. The previous default was insufficient for any large upgrades and could cause out-of-memory errors. The new default provides additional headroom and improves upgrade stability.
- Custom memory limits can still be set using the
--jvm-optsparameter. - Even larger limits may be needed depending on the database size.
- Custom memory limits can still be set using the
-
Recent DXP versions ship with a simpler
tomcatdirectory name instead of including the version number (such astomcat-10.1.43). This applies to both bundled Tomcat releases and Docker images. The default inapp-server.propertieshas been updated to match this change. This reduces the need for manual property management when upgrading modern DXP installations. -
The interactive setup now validates inputs as they are entered, catching problems before the upgrade starts. Previously, only the application server type and database type were validated, allowing invalid values to proceed until failures occurred later in the process. This approach catches configuration mistakes early instead of allowing them to cause failures during upgrade execution. The following inputs are now validated:
- Directory paths: When paths are entered for Liferay home, application server directory, extra libraries, global library, or portal directory, the tool verifies they exist. Invalid paths trigger an error message explaining the issue, and the prompt repeats.
- Database host: The tool checks if the database hostname can be resolved via DNS. Resolution failures result in an error message with details.
- Database port: Port numbers are validated to ensure they fall within the valid range (0-65535). Invalid ports are rejected immediately with an error.
-
The tool now reads existing database configuration from
portal-ext.propertiesinstead of requiring re-entry. It can still be overridden byportal-upgrade-ext.properties. -
Default JVM parameters are automatically applied, in addition to custom parameters from
--jvm-opts. The following are applied unless explicitly changed by the user:-Dfile.encoding=UTF8-Duser.country=US-Duser.language=en-Duser.timezone=GMT-Xmx4096m
-
To improve database upgrade performance, database connections are now automatically configured with batch insert optimization parameters, removing the need for manual JDBC URL configuration for the upgrade. User defined parameters are still preserved.
- PostgreSQL: Adds
reWriteBatchedInserts=trueto enable batch insert optimization - MySQL/MariaDB: Adds
rewriteBatchedStatements=trueto enable batch statement rewriting - SQL Server: Adds useBulkCopyForBatchInsert=true to enable bulk copy for batch operation
- PostgreSQL: Adds
-
The upgrade tool now uses a single configuration file for all upgrade settings. All properties are set from
portal-upgrade-ext.properties. Theportal-upgrade-database.propertiesis now deprecated and ignored. -
The default application server directory paths in both the
app-server.propertiestemplate have been updated to use explicit relative path notation to reduce confusion about the upgrade file paths./bin→./bin/lib→./lib/webapps/ROOT→./webapps/ROOT/WEB-INF/...→./WEB-INF/...
-
The upgrade tool’s interactive wizard now uses PostgreSQL as the default database. This change reflects PostgreSQL’s widespread adoption and recommended usage for Liferay DXP. Users can still select any supported database by entering a different value at the prompt.