Select to view content in your preferred language

ArcGIS Server temp files

180
6
a week ago
MichaelJenkins
Occasional Contributor III

We are seeing .tmp files in the C:\Users\<account name>\AppData\Local\Temp that are not getting cleaned up.  This directory has over 57 thousand files, dating back to Jan 2023.

One tmp file has today's date and it over 100 GB in size.  It set off monitoring alerts today for using so much space.

Two questions, then.  Why is the temp file so large and why arent temp files getting cleaned up?

 

GISP
6 Replies
ChrisUnderwood
Esri Contributor

Hello @MichaelJenkins  is <account name> your username, or the ArcGIS Server account's username, or even another user's username ?

0 Kudos
MichaelJenkins
Occasional Contributor III

It is the service account used to run the 'ArcGIS Server' service.

GISP
0 Kudos
ChrisUnderwood
Esri Contributor

Thanks for the update. Are you able to tell, for example by file Dates & Times, if the .tmp files relate to running a site backup (via WebGISDR, backup,py, or exportSite etc). If so, do any of those backup mechanisms fail in any way ?

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

As Chris is trying to help you tease out, there are a variety of issues that may be occurring.  Instead of trying to troubleshoot what has happened over the past 18 months, why not clear out the temp folder and then start watching it more regularly.  That way, you will have a much better idea of what is happening on ArcGIS Server around the time a bunch of temp files are created and not cleaned up.

0 Kudos
MichaelJenkins
Occasional Contributor III

Thank you @ChrisUnderwood  and @JoshuaBixby .   None of those things happen on this server (site backups etc)

I went to Esri support with this question and was told the temp files are created when a process fails but that there is no way to tell what process created them.   While it would be useful to know that, I was hoping to find an answer as to why these "temp" files are persisting for so long.  It seems like they should be automatically cleaned up by either ArcGIS Server or Windows OS.

Apparantly that is not the case, though, and what we are seeing is expected behavior.  So the lesson learned is to check your service account's appdata\local\ temp directory at least a few times per year and clean out the old stuff, or if your C drive suddenly fills up unexpectedly.

 

GISP
0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Instead of manually checking it and cleaning it up, just create a scheduled task on each ArcGIS Server machine that will delete all the temp files on some regular basis.  If a temp file is actively in use and has a lock, the file won't be deleted, but everything else will be.

0 Kudos