Development Server Data Cleaning
Over time, as process designs are continuously updated and developed on the development server, an increasing number of XPDLs accumulate in memory. This buildup can lead to a java.lang.OutOfMemoryError
exception during runtime or when starting the server. To address this issue, periodically clean the unused XPDLs from the system. Use the following steps to safely perform this cleanup. The example queries provided support both MySQL and MSSQL databases.
Check the existing count of XPDLs
On a common production server, there are normally only a few app versions, and each version is tied to 1 process version. This is because we won't do any development on the production server, so the process version is only increased during app importation. However, this will be a different case for the development server. The process version will be going up to a few hundred process versions, which means there are a few hundred XPDL data cached in memory. To check how many XPDLs are cached, please run the following query in your database server.
- MySQL, MSSQL, Oracle:
Check the count of unused XPDLs
In all the cached process version XPDLs, there is a case that any process instances do not use some process version. These unused XPDLs can be safely deleted. You can use the following query to check the number of unused XPDLs and know how many are unused in the total number of XPDLs. Use the following query:
- MySQL and MSSQL:
- Oracle:
Delete completed process instances
Suppose the process instance data are not important to you or you have captured your process instance data as a copy by the Process Data Collector plugin. In that case, you can delete your process instance data to increase the number of unused XPDLs. In this case, only the process version for running process instances and the latest process version for each app will be kept. Use the following queries to do so:
- MySQL:
- MSSQL
- Oracle:
To limit the process within a period for the start and completion, change all the where clauses to the following and modify the date, like in the following examples:
- MySQL:
- MSSQL:
- Oracle:
You can use the following query to clean all the process instance data, including the running process instances:
- MySQL:
- MSSQL:
- Oracle:
Delete the unused XDPLs
Now, you can delete the unused XPDLs, and they will be free from your memory cache when the next server starts. Use the following query to do so:
- MySQL:
- MSSQL:
- Oracle: