I have a script that used to work finely under ArcGIS 10.3.1 and Windows 7. Thar script performed a SetNull on a number of rasters and then mosaic them. This workflow has to be repeated more than 5000 times. Now I have ArcGIS 10.5 and Windows 10 and the script fails around the 180 loop and always on the SetNull function. I had many different types of errors, like ‘out of memory’ or ‘the raster can’t be open’. I guess it is a problem related with the virtual memory, but I could not solve it. The script includes an error handling to trace errors, delete workspace, scratchFolder, gc.collect(), but always fails around the same loop.
Then I checked what happened with a simple script that tries to Set Null a large number of rasters in a folder (5900) and save the result in another folder.
Now, SetNull() fails after near 1500 loops, whatever the modification I tried, and the error is saving the result (ERROR: 010240). However the same script works fine in Windows 7 and with ArcGIS 10.3.1. I think this is not an issue exclusive of SetNull(), and can occur with other functions that creates temporary data.
Does anybody know if arcpy changed its performance in Windows 10 or ArcGIS 10.5? Is there something I have to change in the computer settings?
Thanks for your answers