Select to view content in your preferred language

Does the ArcGIS Monitor SQLite DB for logs get compacted?

707
3
Jump to solution
10-11-2023 02:29 PM
TristanMcHardie
Regular Contributor

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?

0 Kudos
1 Solution

Accepted Solutions
GeoJosh
Esri Regular Contributor

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

View solution in original post

3 Replies
GeoJosh
Esri Regular Contributor

Hey Tristan,

The logs table should automatically get truncated when you change the log retention period in Administration > Logs > Log Settings.

GeoJosh_0-1697137520722.png

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

TristanMcHardie
Regular Contributor

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

0 Kudos
GeoJosh
Esri Regular Contributor

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