Contributed by Michael Cunanan and Rohit Patel
Cases were reported for Pega Platform™ versions Pega 8.8.1, 8.7.4, 8.7.3, 8.6.3, 8.6.5, 8.6.6, 8.5.6, and 8.5.5 pertaining to Runtime Engine > Engine > Rule Assembly > Application-Based Assembly Cache.
Companion document
Symptoms
Errors
Explanation
Environments
Solutions
Related content
Companion document
Managing inactive branches in branched application development [SDR-A1]
Symptoms
As you create application branches, you see the error indicating that the temporary file size exceeds its limit. The temporary file size limit was set to 1GB. You increase the temporary file size limit to prevent the problem, but the error persists periodically. The size of cache tables grows exponentially over time.
You submit a Cloud Change to request that a Support engineer truncate cache tables to resolve the problem, but you know that this is a risky, time-consuming practice and one that you should avoid.
Running the logger com.pega.pegarules.generation.internal.cache.RAPurge suggests a failure of the PurgeAssemblyDatabaseCache agent. This failure is caused by the large cache tables.
The following cache tables typically increase in size when the PurgeAssemblyDatabaseCache agent fails:
pr_assembledclasses
pr_sys_appcache_entry
pr_sys_appcache_shortcut
pr_sys_appcache_dep
pr_sys_rule_impl
pr_sys_app_ruleset_index
pr_sys_app_hierarchy_flat
pr_sys_ruleset_index
Errors
There was a problem getting a list code: 0 SQLState: 53400 Message:
ERROR: temporary file size exceeds temp_file_limit(1048S76kB)
Explanation
The error can occur when the size of cache tables grows exponentially over time. Cache consumption is compounded when you schedule server reboots that override when the PurgeAssemblyDatabaseCache agent runs. By default, the PurgeAssemblyDatabaseCache agent is scheduled to run once a week at 1:00 A.M. local time. If you schedule weekly server reboots, these reboots cancel the processing of the PurgeAssemblyDatabaseCache agent, and no purging is performed. After some time, the lack of a weekly purge can exhaust cache files, resulting in degraded system performance.
Environments
The problem was reported in the following environments:
- Pega Platform version 8.5.5 on-premises
- Pega Platform version 8.5.6 on-premises
- Pega Platform version 8.6.6 on-premises
- Pega Platform version 8.6.5 on-premises
- Pega Platform version 8.6.3 on-premises
- Pega Platform version 8.7.3 on-premises
- Pega Platform version 8.7.4 on-premises
- Pega Platform version 8.8.1 on-premises
- Pega Cloud® services 2.24.4
Solutions
Do not perform weekly application server reboots that interfere with the schedule of the PurgeAssemblyDatabaseCache agent.
Facts to know before you resolve Purge issue
Suggested approach to resolve Purge issue
Still need assistance?
Facts to know before you resolve Purge issue
Before you increase the frequency of when the PurgeAssemblyDatabaseCache agent is run and change the DSSes, consider the following questions and their answers:
How long will the agent reschedule and DSS changes take to go into effect?
This is a one-time process. It takes approximately 15 to 20 minutes for the new Purge schedule and related DSSes to take effect.
Does this process require downtime?
No
Can the DSS values be changed during a client’s data ingestion?
Yes
What is the recommended increase of frequency? Twice a week? Three times a week?
The best practice is to run the PurgeAssemblyDatabaseCache agent every day.
Will the default schedule of the Pega-provided PurgeAssemblyDatabaseCache agent be set to increased frequency in future releases of the Pega Platform?
A Pega Platform enhancement request is being assessed. For future information, watch the Pega Platform Release Notes and the Pega Platform Resolved Issues for a given release. Hotfixes are developed and delivered for high-priority, special cases only. You are expected to Keep Current with Pega.
Future release notes will be available from the Pega Platform documentation, where you currently see the Pega Platform version 8.8 Release Notes.
What performance improvements result from increased purge frequency?
With increased purge frequency, the size of cache tables will remain normal. This stabilizes performance.
Suggested approach to resolve Purge issue
If you must continue to use the PurgeAssemblyDatabaseCache agent, confirm when and how often this agent is scheduled to run:
- In Dev Studio, click .
- On the column header, select the filter RuleSet Name and enter Pega-RulesEngine.
- Select the corresponding agent.
- In the Agent record form, click the Nodes tab and select the node with NodeType set to BackgroundProcessing.
- On Agent PurgeAssemblyDatabaseCache (the first row), click Advanced to display the modal dialog box.
- In the modal dialog box, change the time zone from US Eastern to the local time zone.
- To ensure that the agent starts quickly and runs efficiently, change its schedule from running weekly on Sundays to running daily, every day of the week. Daily is a good schedule for the agent until the system regains its equilibrium.
- Close the modal dialog box and save the record.
- Update the related dynamic system settings (DSSes) for the PurgeAssemblyDatabaseCache agent to improve when and how the agent runs. Change the Default Values where noted.
fua/skipHasPurgeHappenedSinceStartupCheck Skips purge when value is false.
Owning Ruleset: Pega-RulesEngine
Purpose: fua/skipHasPurgeHappenedSinceStartupCheck
Value: true
Default Value: false
fua/minimumDelayHoursForPurgeAgent Skips purge when returns false.
Owning Ruleset: Pega-RulesEngine
Purpose: fua/minimumDelayHoursForPurgeAgent
Value: 4
Default value: 24 hours (Do not set value to less than 3.)
fua/maximumAssembliesToPurge Determines the number of assemblies that will be picked up by the PurgeAssemblyDatabaseCache agent.
Purpose: fua/maximumAssembliesToPurge
Owning Ruleset: Pega-RulesEngine
Value: 50000 If you have 200,000 entries average inserts per day in the past 15 days (about 2 weeks), you can change this number to 200000.
Default Value: 5000
fua/maximumApplicationsToPurge Determines the number of applications that will be picked up by the PurgeAssemblyDatabaseCache agent.
Purpose: fua/maximumApplicationsToPurge
Owning Ruleset: Pega-RulesEngine
Value: 50000 If you have 200,000 entries average inserts per day in the past 15 days (about 2 weeks), you can change this number to 200000.
Default Value: 10000
ResetTableStats Defines whether to reset database statistics when the information is sent to PDC by PegaAESRemote agents. Resetting database statistics has an impact on when autoanalyzer and auto vacuum run in PostgreSQL. These activities will be fired less often, leading in some cases to fragmentation or table bloating.
Purpose: ResetTableStats
Owning Ruleset: PegaAESRemote
Value: false
maxResultToDeleteFromRuleSetIndexTable Determines the number of ruleset indexes that will be picked up by the PurgeAssemblyDatabaseCache agent.
Owning Ruleset: Pega-RulesEngine
Purpose: fua/maxResultToDeleteFromRuleSetIndexTable
Value: 50000 If you have 200,000 entries average Inserts per day in the past 15 days (about 2 weeks), you can change this number to 200000.
Default Value: 10000
purgeAgeInDaysForRuleSetInRuleSetIndex Determines the age of ruleset index in days.
Owning Ruleset: Pega-RulesEngine
Purpose: fua/purgeAgeInDaysForRuleSetInRuleSetIndex
Value: 30 (or a lower value according to your requirements) If you are creating enough ruleset branches within 15 days (about 2 weeks), then you need this number to be below 30.
Default value: 90 days
purgeAgeInDaysForRulesInLogUsage
Owning Ruleset: Pega-RulesEngine
Purpose: fua/purgeAgeInDaysForRulesInLogUsage
Value: less than 7 days
Default value: 7 days
purgeAgeInHoursForRulesNotInLogUsage Determines the age of rules that are not in use since a specific time (Not usually modified)
Owning Ruleset: Pega-RulesEngine
Purpose: fua/purgeAgeInHoursForRulesNotInLogUsage
Value: 20 (or a lower value according to your requirements)
Default value: 25 hours
Still need assistance?
If, after performing the Best practice or using the Alternative approach, you need help, submit a Support ticket:
- Go to My Support Portal.
- Click Create a ticket.
- Click .
Note
In Pega Platform '24.1 and later versions, PurgeAssemblyDatabaseCache agent has been replaced with PurgeAssemblyDatabaseCache job scheduler.
Related content
Pega Documentation
Background processing best practices
Troubleshooting background processing
Default dynamic system settings Pega-RulesEngine agents
Node and cluster default job schedulers
Pega Support Document
Managing inactive branches in branched application development [SDR-A1]