Configuring the log cleanup and archival properties
In Adeptia Suite log cleanup and archival happens daily to clean up the logs and temporary repository files older than the specified number of days (retain time). The logs cleanup and archival is governed by the properties that are discussed on this page.
Setting up the cleanup and archival properties
Follow the steps given below to set the properties related to the archival and cleanup of the logs and repository files.
- Click Administer > Setup > Application Settings > Update System Properties.
- Expand Process Flow > Archival.
Change the values for the properties described in the following table as per your need.
Property
Description
abpm.logs.archival.enable Enables or disables the archival of the Process Flow logs and repository files.
- The possible values are yes and no.
- Set the value for this property to yes if you want to archive the Process Flow logs and repositories before they are cleaned up by the cleanup task.
abpm.logs.archival.database Specifies whether to use another database server for logs archival or not.
- The possible values are 1 and 2.
- Set this property to 1 if you want to use same database server for logs and logs archival. In this case, for every log table, an archive table is created in the log database for logs archival.
- Set this property to 2 if you want to use another database for logs archival.
- It is recommended that you use the another database to archive the logs. This prevents performance related issues that may occur when you use same database for logs and logs archival.
If you set this property to 2, you need to create a new database and create a replica of the log tables within that database.
You can refer to the section "Using separate database server for archived logs" discussed on this page to know how to create logs archival tables.
To enable Adeptia Suite to connect to the newly created log archive database, you need to specify the Log Archive Database properties.
abpm.logs.sendNotification.onArchivalFailure Specifies whether to send an email notification or not in case an error occurs during the logs archival.
- The possible values are yes and no.
- Set the value for this property to yes if you want to send an email notification to the email address configured for the admin user, in case of an error during log archival. Ensure that the mail server parameters are configured properly when you set the value for this property to yes.
abpm.archive.fetchsize Number of records to be fetched at a time from result set cursor. abpm.archive.pagesize The total number of records to be fetched by the query in a single page. abpm.archive.chunksize Number of records to be processed in each thread. All the threads run in parallel fashion. abpm.logs.b2b.retainTime Property that defines the retain time for EDI Transactions/Templates logs.
abpm.logs.db.retryErrorCodes Error codes for which retry is performed in case an error occurs while executing the query for all the tables.
You can enter multiple error code separated by comma.
abpm.logs.db.skipErrorCodes Error codes for which no retry takes place in case an error occurs while executing the query for all the tables.
You can enter multiple error code separated by comma.
abpm.logs.retainTime Property that defines the retain time for the logs (other than EDI).
abpm.archive.logRetainTime Property that defines the retain time for the archived logs. abpm.logs.retryCount The number of times the application retries running the query for log cleanup and archival in case the query execution fails.
The number of times the retry happens in case of failure of execution of a query.
abpm.logs.retryInterval Time interval (in seconds) after which the re-execution of query for transaction log and transaction data tables is performed if the query execution fails.
abpm.archive.delete.chunksize Maximum number of archived records that can be deleted from a thread at a time. All the threads run in parallel fashion. delete.chunksize Maximum number of logged records that can be deleted from a thread at a time. All the threads run in parallel fashion. - Click Save to save the changes.
Restart Kernel and WebRunner.
Setting up the log and log archive database properties
Follow the steps given below to set the properties related to log and log archive database.
- Click Administer > Setup > Application Settings > Update System Properties.
- Click to expand Maintenance.
- Click to expand Cleanup and Archival Database Properties.
- Change the values for the following properties as per your need.
Property | Example Value | Description |
---|---|---|
abpm.archival.archive.db.maxActive | 50 | Maximum number of simultaneous connections that can exist between the archive database and the application. |
abpm.archival.archive.thread.corepoolsize | 20 | Number of worker threads used for performing log archival and cleanup. Each thread consumes one connection. |
abpm.archival.archive.thread.maxpoolsize | 20 | Maximum number of worker threads that can be used to perform log archival and cleanup. Ensure that this number is less than or equal to the number of connections in the connection pool. |
abpm.archival.archive.thread.queuecapacity | 0 | The maximum number of log archival and cleanup tasks that can remain in queued state after all the defined threads are exhausted. |
abpm.archival.archive.logdb.minIdle | 25 | The minimum number of idle archive database connections that must exist in the connection pool. |
abpm.archival.archive.logdb.maxWait | 600000 | Maximum lifetime (in milliseconds) of the archive database connection after it is closed. |
abpm.archival.archive.logdb.minEvictableIdleTimeMillis | 3600000 | Minimum time (in milliseconds) for which an unused archive database connection must sit idle before it becomes a candidate for eviction from the pool. |
abpm.archival.archive.logdb.maxStatements | 0 | Maximum number of PreparedStatements the DataSource can cache for archive database. |
abpm.archival.logdb.maxActive | 50 | Maximum number of simultaneous connections that can exist between the log database and the application. |
abpm.archival.logdb.maxStatements | 0 | Maximum number of PreparedStatements the DataSource can cache for log database. |
abpm.archival.logdb.maxWait | 600000 | Maximum lifetime (in milliseconds) of the log database connection after it is closed. |
abpm.archival.logdb.minEvictableIdleTimeMillis | 3600000 | Minimum time (in milliseconds) for which an unused log database connection must sit idle before it becomes a candidate for eviction from the pool. |
abpm.archival.logdb.minIdle | 25 | Minimum number of idle log database connections that must exist in the connection pool. |
abpm.archival.logdb.testOnBorrow | true | Specifies whether a log database connection from the pool has to be validated (usually by a simple SQL validation query defined in validationQuery) or not. |
abpm.archival.archive.logdb.testOnBorrow | true | Specifies whether an archive database connection from the pool has to be validated (usually by a simple SQL validation query defined in validationQuery) or not. |
abpm.archival.logdb.validationQuery | SELECT 1 | Defines the query that will be executed for all the log database connection tests (validation) if the default ConnectionTester (or some other implementation of QueryConnectiontester, or better yet Full QueryConnectionTester) is being used. Enter the following values based on the type of database you are using:
|
abpm.archival.archive.logdb.validationQuery | SELECT 1 | Defines the query that will be executed for all the log database connection tests (validation) if the default ConnectionTester (or some other implementation of QueryConnectiontester, or better yet Full QueryConnectionTester) is being used. Enter the following values based on the type of database you are using:
|
abpm.archival.archive.logdb.isolation.level | 1 | Defines the degree to which a transaction must be isolated from the data modifications made by any other transaction in the database. Transaction isolation level for the archive database connections in the connection pool.
|
abpm.archival.logdb.isolation.level | 1 | Transaction isolation level for the log database connections in the connection pool.
|
abpm.archival.logdb.pooltype | hikari | Defines the type of JDBC connection pool to be used for log database. |
abpm.archival.archive.logdb.pooltype | hikari | Defines the type of JDBC connection pool to be used for archive database. |
4. Click Save to save the changes.
5. Restart Kernel and WebRunner.