<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Danger Will Robinson! Your Pro Python Code is Wrecking the Spaceship! in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/danger-will-robinson-your-pro-python-code-is/m-p/330201#M14432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;yep it can fill up fast - a lot of those file get created when you are manipulating ArcGIS Pro projects or ArcMap documents and during the create sd draft, service publishing process. What I usually do is I have a class that cleans up a directory and I run this as the last step in my Python workflow making sure to clean up any files that may have been created during the run process. Note that you need to del any references to file items to clear handles on them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 May 2019 21:39:08 GMT</pubDate>
    <dc:creator>FraserHand1</dc:creator>
    <dc:date>2019-05-01T21:39:08Z</dc:date>
    <item>
      <title>Danger Will Robinson! Your Pro Python Code is Wrecking the Spaceship!</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/danger-will-robinson-your-pro-python-code-is/m-p/330200#M14431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For years, I have with great success been updating my AGOL feature services with on-prem data using&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/analytics/analytics/updating-your-hosted-feature-services-with-arcgis-pro-and-the-arcgis-api-for-python/"&gt;https://www.esri.com/arcgis-blog/products/analytics/analytics/updating-your-hosted-feature-services-with-arcgis-pro-and-the-arcgis-api-for-python/&lt;/A&gt;&amp;nbsp;as a nightly scheduled task. Emphasis on years. Great tool &lt;A href="https://community.esri.com/migrated-users/3147"&gt;Kevin Hibma&lt;/A&gt;&amp;nbsp;! In my work flow, for folks needing to make a "Map" (not edit), we push them to use AGOL hosted feature services which allow me to dial down the number of service instances I need to maintain on my GIS server farm, which I limit to just "Editors". In this scenario, any edits the editors make will show up in the mappers maps the next day. We have a few scenarios where that doesn't work obviously, so I spawn more instances by default to support the mappers. I control all of this with AD groups driving the permissions on the GIS servers, as well as the Portal (no federation!). This allows me to &lt;STRONG&gt;not need&lt;/STRONG&gt; to deploy about 20 GIS servers, as we have discovered there is a finite number of service instances a single server can push, despite memory and CPU.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Until this past weekend. The server this was running on, as a scheduled task using a domain service account, went on a protest strike. 2 days of troubleshooting narrowed it down to an issue with the local profile of the service account, which we could no longer troubleshoot, as we couldn't even get access to the profile, not even with Powershell. Long story short, here's what was happening.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Python runs at 1910:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/445396_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Success is written to a log&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/445418_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But....&lt;/P&gt;&lt;P&gt;A massive plethora of junk ends up in&amp;nbsp;C:\Users\[domainsvcaccount]\AppData\Local\Temp!&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/445419_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8 items to be exact. Times 100-ish hosted feature services being updated daily. Times 2 years.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What had happened is the local\temp folder filled up with several hundred million of these things, several hundred gb worth. It simply blew up the OS. I was able to clear it out using Snake Oil.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's well known that clearing&amp;nbsp;&lt;SPAN&gt;local\temp&amp;nbsp;solves many ESRI problems, and we do so frequently with desktop. But this is the first time I've seen the problem using Python.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So the warning here is, if you're a heavy user of&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/analytics/analytics/updating-your-hosted-feature-services-with-arcgis-pro-and-the-arcgis-api-for-python/" style="color: #2989c5; text-decoration: none;"&gt;https://www.esri.com/arcgis-blog/products/analytics/analytics/updating-your-hosted-feature-services-with-arcgis-pro-and-the-arcgis-api-for-python/&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;, &lt;STRONG&gt;make sure to automate cleaning&amp;nbsp;C:\Users\[domainsvcaccount]\AppData\Local\Temp.&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;As a side note, I'm curious&amp;nbsp; (concerned) as to why Py is throwing that much stuff in the temp folder, but like I said, automated clean up in the solution here.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2019 15:21:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/danger-will-robinson-your-pro-python-code-is/m-p/330200#M14431</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2019-05-01T15:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Danger Will Robinson! Your Pro Python Code is Wrecking the Spaceship!</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/danger-will-robinson-your-pro-python-code-is/m-p/330201#M14432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;yep it can fill up fast - a lot of those file get created when you are manipulating ArcGIS Pro projects or ArcMap documents and during the create sd draft, service publishing process. What I usually do is I have a class that cleans up a directory and I run this as the last step in my Python workflow making sure to clean up any files that may have been created during the run process. Note that you need to del any references to file items to clear handles on them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2019 21:39:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/danger-will-robinson-your-pro-python-code-is/m-p/330201#M14432</guid>
      <dc:creator>FraserHand1</dc:creator>
      <dc:date>2019-05-01T21:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Danger Will Robinson! Your Pro Python Code is Wrecking the Spaceship!</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/danger-will-robinson-your-pro-python-code-is/m-p/330202#M14433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now... don't go blaming python... probably something in the ArcGIS API &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 00:10:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/danger-will-robinson-your-pro-python-code-is/m-p/330202#M14433</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-05-02T00:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Danger Will Robinson! Your Pro Python Code is Wrecking the Spaceship!</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/danger-will-robinson-your-pro-python-code-is/m-p/330203#M14434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;+1 for title of page! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;and thanks for the advice!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2019 14:52:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/danger-will-robinson-your-pro-python-code-is/m-p/330203#M14434</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2019-05-24T14:52:33Z</dc:date>
    </item>
  </channel>
</rss>

