reduction of space and credit consumption.

413
5
Jump to solution
03-07-2024 02:21 AM
Fab_of_SSI
New Contributor II

Hello everyone,
in Arcgis Online we have a feature layer produced by a very simple survey form that contains around 300 points with a thousand photographic attachments. From the properties of the layer we obtain the size of approximately 36 MB for the point data and approximately 1 GB for the photographic attachments.

Having the need to save storage credits, we proceeded to empty the layer by deleting all the records ("delete feature" function from the REST API), we also activated the "TRUNCATE" function (again from the REST API) and therefore now the layer is completely empty (apparently). In fact, by doing a query the feature layer returns zero records and zero attachments.

However, after a few days, the space has not been freed and is still 36 MB + 1 GB of attachments, consuming the same number of credits as before.

How can we proceed to free up storage space and consequently reduce credit consumption? Also because we are interested in keeping the structure of the Survey cards intact in order to be able to collect new data in the future. We therefore do not want to 'eliminate' feature layers completely.

Thank you.

0 Kudos
1 Solution

Accepted Solutions
Fab_of_SSI
New Contributor II

On 3/28/24, by activating the English version of the user profile (My Setting) in the feature layer, the "Keep track of who edited the data (editor name, date and time)" option was active, which was initially not present but is probably was automatically restored by the new submission made via Survey123.

The fact is that once this option was cancelled, the size of the layer's attachments was 0 kb.

It should be noted that this option had already been canceled previously without results. As well as the other editing and sync options. Except that it was made with the versioning of the interface in Italian (?).

I don't know what to say but that's fine! 😄

View solution in original post

0 Kudos
5 Replies
ChristopherCounsell
MVP Regular Contributor

Feature storage includes backend tables for tracking edits and updates. 

Toggling editing and sync on the hosted feature layer will clear these.

You might benefit from turning off tracking updates, if the features are frequently edited

0 Kudos
Fab_of_SSI
New Contributor II

Thanks Chris

I had already turned off the data Sync option but the size remained the same.

Do I Need to toggle off editing as well?

 

0 Kudos
ChristopherCounsell
MVP Regular Contributor

If you have editor tracking on, and have removed all features, but feature storage remains, there's a possibility it still has all those tables recording what adds, updates and deletes have occurred.

I've seen exactly what you are seeing before with a 1gb layer, no features. Toggling editing on and off reduced the size to 0kb as it cleared those tables. Turning off 'track updates' helped keep the size low in the future.

You will lose the editing history but given you've already deleted all the features it doesn't sound like a problem.

So yes, turn editing on/off.

https://esriaustraliatechblog.wordpress.com/2021/06/22/which-arcgis-online-items-are-consuming-the-m...

0 Kudos
PeterKnoop
MVP Regular Contributor

We have run into this as well when clearing out a hosted feature layer by truncating it. (Get yourself attached to BUG-000135310 for more details, which is listed as fix, however, they seem to mean in this case that "it is working as expected.")

The workaround to reset the size, so that you are not charged credits unexpectedly, is to compress the empty feature service. And, if that doesn't do it by itself, then make an edit in the feature service to trigger the reset (i.e., add a bogus new feature, then delete that feature.) After a few more hours the size should be zero. (Our experience has been that the second step is required most, but not all time.)

One way to do all this is to go to your hosted feature layer's Item Details view, after you have deleted all the data, then:

  1. View the feature service URL in the lower-right of the page.
  2. Select the Admin interface in the top-right.
  3. Select Compress from the Supported operations at the bottom of the page.
  4. Click the "Compress data" button.

Give it a few hours for the size to go to essentially zero. If it hasn't changed, then go on to second part:

  1. Create a new feature in the layer.
  2. Delete that feature.

Wait a few more hours for the size to go to zero.

You do not have to wait though, if you don't care about seeing the size go to zero. Once you have deleted all the features, you can compress it, and immediately start editing features again, and you should see the correct size of your new content reflected after several hours.

0 Kudos
Fab_of_SSI
New Contributor II

On 3/28/24, by activating the English version of the user profile (My Setting) in the feature layer, the "Keep track of who edited the data (editor name, date and time)" option was active, which was initially not present but is probably was automatically restored by the new submission made via Survey123.

The fact is that once this option was cancelled, the size of the layer's attachments was 0 kb.

It should be noted that this option had already been canceled previously without results. As well as the other editing and sync options. Except that it was made with the versioning of the interface in Italian (?).

I don't know what to say but that's fine! 😄

0 Kudos