I noticed our logs database at AppData\Local\ESRI\ArcGISMonitor\config-store-server\logs\agm-logs.sqlite is getting up to 1 GB. This isn't necessarily a problem in our case but I was curious about how this database's size is managed.
The default retention period is 90 days but I shortened this to 60 days. However, the database file size didn't reduce, even after restarting the ArcGIS Monitor service.
I'm wondering, does this DB get VACUUMed?
Solved! Go to Solution.
Tristan,
Thank you for bringing this issue to our attention. Starting in Monitor 2023.3, the SQLite database will be auto-VACUUM'ed and this issue should be resolved.
Josh
Hey Tristan,
The logs table should automatically get truncated when you change the log retention period in Administration > Logs > Log Settings.
If this not the case for you, there's a chance that a majority of the logs that make up the 1GB were created less than 60 days ago. If you sort the existing logs by date (oldest to newest), do you see entries that are greater than 60 days old?
Josh
Hi @GeoJosh, thanks for your response.
When I reduced the retention time from 90 to 60 days I saw a one third reduction in the number of log records, and there is nothing older than 60 days. I'm confident that it's consistent across time, and that the records have indeed been deleted.
It's just that the database file size itself hasn't reduced at all. My guess is that it's fragmented and VACUUM needs to be run.
Cheers,
Tristan
Tristan,
Thank you for bringing this issue to our attention. Starting in Monitor 2023.3, the SQLite database will be auto-VACUUM'ed and this issue should be resolved.
Josh