Cleaning up temporary Geodatabase files

1991
5
07-21-2020 10:35 AM
AlexGonzalez2
New Contributor II

I'm currently running into some issues with our Citrix environment where the local temp file geodatabase is consuming a large amount of hard disk space. Some of them are reaching over 1GB in size during a heavy use session. I've opened several of these larger files and they appear to be SQL Lite databases with tiles cached in them.

Is there a way to clear out that temporary cache once the window inside of our application that uses it has closed rather than waiting for it to be cleaned up when the application shuts down?

I came across the documentation for shutting down the LocalServer. But that doesn't seem to be quite what I'm looking for.

Any suggestions would be helpful.

0 Kudos
5 Replies
JoshuaBixby
MVP Esteemed Contributor

This is posted in ArcGIS Runtime SDK for .NET space.  Is this a custom Add-in, Extension, or stand-alone app that you are talking about, or is the question general for ArcGIS Desktop/ArcMap or ArcGIS Pro?

0 Kudos
AlexGonzalez2
New Contributor II

This is a custom application that's using the .Net ArcGIS Runtime.

We're using the 100.6 WPF SDK and as the MapView requests tiles from the server during the user session the geodatabase temp files are growing quite large. We could attempt to clean all of the temporary files but some of them are still in use by our application. So we're looking for a way to determine which file(s) belong to the map view so we can remove them when the window using the map view closes to free up hard disk space.

0 Kudos
dotMorten_esri
Esri Notable Contributor

The files are supposed to get cleared out once the layer is out of scope and garbage collection (which also happens on shutdown). I can't say for sure why that's not happening here.
Having said that, if you set the ArcGISRuntimeEnvironment.TempPath Property  property, you can delete all the contents in this folder on shutdown to create a complete cleanup of everything and anything.

0 Kudos
BradBrasel
New Contributor

Morten,

I work with Alex and was wondering what other files are placed in the .geodatabase?  Since this is a custom .NET application accessed via Citrix,  there is concern over the overall space that is chewed up on the citrix server farm.  Is there an overall best practice to follow for Citrix and user profiles for these types of scenarios?  Are Roaming profiles needed?  Any info you can point out on this subject would be greatly appreciated. 

Thanks,

Brad

0 Kudos
dotMorten_esri
Esri Notable Contributor

The temporary .geodatabase files are used by the renderer engine to manage data from feature services and tile services. What specifically is internal and isn't really documented, but I don't see a way to avoid those being created - the alternative would be to put it in memory, and then you'd have a completely new set of problems.

Again files _should_ be cleaned up once the data is no longer in use - if not that might be a problem that needs investigating. Note though that if you shut the app down forcefully (stopping a debug session in visual studio or killing the process for instance), that wouldn't get a chance to happen.

You definitely shouldn't be roaming this data, so make sure you set the temp path to a non-roaming folder.

0 Kudos