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.

  1. Click Administer > Setup > Application Settings > Update System Properties.
  2. Expand Process Flow Archival.
  3. 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 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.fetchsizeNumber of records to be fetched at a time from result set cursor.
    abpm.archive.pagesizeThe total number of records to be fetched by the query in a single page.
    abpm.archive.chunksizeNumber 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.logRetainTimeProperty 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.chunksizeMaximum number of archived records that can be deleted from a thread at a time. All the threads run in parallel fashion.
    delete.chunksizeMaximum number of logged records that can be deleted from a thread at a time. All the threads run in parallel fashion.
  4. Click Save to save the changes.
  5. 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.

  1. Click Administer > Setup > Application Settings > Update System Properties.
  2. Click  to expand Maintenance.
  3. Click  to expand Cleanup and Archival Database Properties.
  4. Change the values for the following properties as per your need.
Property
Example Value
Description
abpm.archival.archive.db.maxActive50

Maximum number of simultaneous connections that can exist between the archive database and the application.

abpm.archival.archive.thread.corepoolsize20

Number of worker threads used for performing log archival and cleanup.

Each thread consumes one connection.
abpm.archival.archive.thread.maxpoolsize20

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.queuecapacity0The 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.minIdle25The minimum number of idle archive database connections that must exist in the connection pool.
abpm.archival.archive.logdb.maxWait600000Maximum lifetime (in milliseconds) of the archive database connection after it is closed.
abpm.archival.archive.logdb.minEvictableIdleTimeMillis3600000Minimum 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.maxStatements0Maximum number of PreparedStatements the DataSource can cache for archive database.
abpm.archival.logdb.maxActive50Maximum number of simultaneous connections that can exist between the log database and the application.
abpm.archival.logdb.maxStatements0Maximum number of PreparedStatements the DataSource can cache for log database.
abpm.archival.logdb.maxWait600000Maximum lifetime (in milliseconds) of the log database connection after it is closed.
abpm.archival.logdb.minEvictableIdleTimeMillis3600000Minimum 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.minIdle25Minimum number of idle log database connections that must exist in the connection pool.
abpm.archival.logdb.testOnBorrowtrue

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.testOnBorrowtrue

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.validationQuerySELECT 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:

  • SELECT 1 for SQL and MYSQL
  • SELECT 1 FROM DUAL for ORACLE
  • ELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS for HSQL
abpm.archival.archive.logdb.validationQuerySELECT 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:

  • SELECT 1 for SQL Server and MYSQL
  • SELECT 1 FROM DUAL for ORACLE
  • SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS for HSQL
abpm.archival.archive.logdb.isolation.level1

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.

  • Enter 1 for READ UNCOMMITTED
  • Enter 2 for READ COMMITTED
abpm.archival.logdb.isolation.level1

Transaction isolation level for the log database connections in the connection pool.

  • Enter 1 for READ UNCOMMITTED
  • Enter 2 for READ COMMITTED
abpm.archival.logdb.pooltypehikariDefines the type of JDBC connection pool to be used for log database.
abpm.archival.archive.logdb.pooltypehikariDefines the type of JDBC connection pool to be used for archive database.

      4. Click Save to save the changes.

      5. Restart Kernel and WebRunner.