I have an ArcGIS Server 10.4.1 deployed on an AWS EC2 instance with Windows Server 2012 R2 on it.
I noticed the C:/ drive attached to the instance is quickly running out of space and I was able to identify the source of it. Under C:/Users/arcgis/AppData/Local/Temp I have several big files that were generated at different points in time.
My question is: can I safely remove these files manually to clean up space without compromising the functionality of several web services published and hosted on that same machine?
Yes, those temporary files can be deleted. We're trying to close up situations where those files are left behind as Server shouldn't be creating files that don't get deleted.
Thanks Jonathan. Most files deleted just fine, but then I get this warning on one of the folders inside the Temp folder.
I am not sure which ArcSOC process uses this folder, but I assume it should be not touched anyway. Is this correct? Are there other files that should not be touched/deleted, e.g. system and utilities folders?
If a service has recently created that file, then it may be in use. You can use Process Explorer to see which PID has locked the file, which will then tell you which service that PID corresponds to if you're looking at the Command Line column in the Task Manager. Anything in there should be temporary files and only created/used during the run of whatever process created them, (like publishing, etc).
Thank you again for your help with this. Not sure if this is what you were suggesting, but below is a screenshot of the running process (ArcServer) with PID corresponding to one of the files inside the Temp subfolder from my previous screenshot above.
As you can see, Task Manager only shows "ArcGIS Server" as the running service related to that PID. Is this expected for the Temp folder? Or am I missing a step from what you suggested?
Actually, I think I now understood better what you were saying. The Process Explores shows the following string in the command line parameter for the PID 11020 that was shown in my first screenshot. Is the webservice using the ArcSOC.exe shown in BOLD below or should I look for something else? Does that mean some user must have been recently using that specific web service then?
"C:\Program Files\ArcGIS\Server\bin\ArcSOC.exe" -XX:-CreateMinidumpOnCrash -Xmx64M -Dservice=Geoprocessing.HabitatQualityInVEST.GPServer "-Djava.class.path=C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-admin.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-catalog.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-common.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-dotnet-provider.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-ejb-impl.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-ejb.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-mcs-framework.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-nodeagent.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-persistence.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-resources.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-security.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-servicelib.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\arcgis-tools.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\dialect-provider.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\elasticsearch-dialect-provider.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\elasticsearch-sql-parser.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\esri-postgres-dialect-provider.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\geopoint-elasticsearch-dialect-provider.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\geoshape-elasticsearch-dialect-provider.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\postgres-dialect-provider.jar;C:\Program Files\ArcGIS\Server\framework\lib\server\sds-core.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\aws-java-sdk-core-1.10.5.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\aws-java-sdk-dynamodb-1.10.5.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\aws-java-sdk-kms-1.10.5.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\aws-java-sdk-s3-1.10.5.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\azure-storage-2.2.0.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\commons-codec-1.6.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\commons-io-2.4.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\commons-lang3-3.3.2.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\commons-logging-1.1.3.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\hazelcast-3.5.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\httpclient-4.3.6.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\httpcore-4.3.3.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\jackson-annotations-2.5.0.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\jackson-core-2.5.3.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\jackson-core-asl-1.9.3.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\jackson-core-lgpl-1.4.2.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\jackson-databind-2.5.3.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\joda-time-2.8.1.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\slf4j-api-1.7.5.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\arcsoc\lucene-core-2.9.3.jar;C:\Program Files\ArcGIS\Server\framework\lib\shared\arcsoc\lucene-snowball-2.9.3.jar;C:\Program Files\ArcGIS\Server\framework\lib\arcobjects.jar" -Djava.security.policy=file:/C:/Program%20Files/ArcGIS/Server/framework/etc/arcsoc.policy "-Djava.rmi.server.codebase=file:/C:/Program%20Files/ArcGIS/Server/framework/lib/server/arcgis-servicelib.jar file:/C:/Program%20Files/ArcGIS/Server/framework/lib/server/arcgis-common.jar" sun.rmi.server.ActivationGroupInit
@JonathanQuinn Is this ArcGIS Server Temp files cleanup automated now?
@JonathanQuinn, I would like to know as well if the cleanup is automated, or is that cleaned by a Windows process?
The cleanup should be automated by ArcGIS Server; if any of the internal processes create files/data in the TEMP directory, that process should be responsible for cleaning it up. If you find that files are accumulating, I'd suggest using ProcMon to filter for "process name is ArcSoc" or "process name is javaw.exe" and "path contains TEMP", which will record who creates files in that directory and when. Then, contact Support to ask them to investigate.
We have 132 GB of .sde, .gdb folders, tmp-ags-export-* folders in the C:\Users\serviceaccount\AppData\Local\Temp location. Portal, AGS and Datastore single deployment 10.9.1. So obviously in this case nothing is being deleted by the application. Esri Case #03731334