In our system there’s no data element with FileResource type but it seems that FileResourceCleanUpJob is running and is loading all the datavalueaudit (more than 5.000.000 of them)
The server is often dumping or running low in free memory.
I found a long running query without where clause
select this_.datavalueauditid as datavalu1_134_0_, this_.dataelementid as dataelem2_134_0_, this_.periodid as periodid3_134_0_, this_.organisationunitid as organisa4_134_0_, this_.categoryoptioncomboid as category5_134_0_, this_.attributeoptioncomboid as attribut6_134_0_, this_.value as value7_134_0_, this_.created as created8_134_0_, this_.modifiedby as modified9_134_0_, this_.audittype as auditty10_134_0_ from datavalueaudit this_ order by this_.created desc
I found in the code a condition on the FileResourceRetentionStrategy in the job
Note that the table systemsetting doesn’t contain ‘keyFileResourceRetentionStrategy’ record
I suspect the retention strategy is null and so != FOREVER and the query on datavalueaudit gets triggered with an empty list of data elements, ending up to the query without where clause.
Is there a way configure this to FOREVER in the UI ?