Select to view content in your preferred language

MaxRecordCount on Feature Service

529
4
06-29-2023 05:55 AM
kapalczynski
Occasional Contributor III

There is a service on our network that consists of multiple Feature Classes.
When I look at the root of the service it says MaxRecordCount 4000

But if I drill down into the individual Feature Classes in the Service each of the FC only have 1000

How do I change the individual ones?  Maybe someone update the main Service at some point to 4000 but this did not effect the individual FC in that service?

Maybe republish the whole thing again?

0 Kudos
4 Replies
MobiusSnake
MVP Regular Contributor

Using the Admin REST API for each individual layer, call Update Definition with this input:

{"maxRecordCount": 4000}

 The easiest way to do this is through the Admin REST API's web interface, but you can use Python or whatever as well.

0 Kudos
Dong_Kun__VDOT_
New Contributor II

Thank you Jay for posting this! I was able to update it finally using the following steps. I will post it here in case other people run into the same situation.

Click the "view" button next to the URL in the item's overview page --> click "Admin" --> select one of the layer / table --> click "Update Definition" --> replace the maxrecordcount values

0 Kudos
Dong_Kun__VDOT_
New Contributor II

Some screenshots!

  1. Click "view" next to the URL in the item's overview page.
Dong_Kun__VDOT__0-1688142665699.png

 

  1. Click "Admin" (top right corner)
Dong_Kun__VDOT__1-1688142665699.png

 

 
  1. Select one of the layers
Dong_Kun__VDOT__2-1688142665699.png

 

 
  1. Click "Update Definition" (at the very bottom)
Dong_Kun__VDOT__3-1688142665699.png

 

  1.  Replace all the Max record count values, and click "update layer definition".
Dong_Kun__VDOT__4-1688142665700.png

 

0 Kudos
A_Wyn_Jones
Esri Contributor

To any Enterprise admins reading, please be mindful of enabling a high maxRecordCount due to memory exhaustion. 

Each ArcGIS Server instance (ArcSOC.exe) has a default heap value of 64MB - if the maxRecordCount of e.g. 4000 returns a JSON string that is higher than 64MB, it will crash the service/fail the request.

 

In some instances of complex data, it may be necessary to set a low maxRecordCount due to the records/features containing so much information (e.g. Complex geometry).

The default SOC heap size can be changed, but be careful when playing with memory 🙂 

https://developers.arcgis.com/rest/enterprise-administration/server/editmachine.htm#:~:text=socMaxHe...

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."