Question

Denial Code 511: System was unable to process the request due to data size limits. REST API

  • 11 April 2024
  • 5 replies
  • 57 views

Badge

We are trying to add a new record in Details tab of Appointment. We are getting error when the number of records under details tab are more than 600. If it is less than 200 or so, we not see any error, everything works as expected.

URL:

https://xxxxx.acumatica.com/entity/customendpointname/20.200.002/Appointment?$expand=Details

Request Body:

{"AppointmentNbr":{"value":"PM004839-1"},"Details":[{"Description":{"value":"test"},"LineType":{"value":"Instruction"},"TargetEquipmentID":{"value":"CHAUD02/ECOL201"},"note":{"value":"string"}}],"ServiceOrderType":{"value":"PM"}}

HTTP PUT

Response from Acumatica REST API:

request entity too large

Error in Acumatica website system monitor screen:

ContextScreenId = ~/ENTITY/DEFAULTKOLOTECH/20.200.002/APPOINTMENT
ContextUserIdentity = mounish@Beaver - Production
CurrentCompany = Beaver - Production
EventID = ResourceGovernor_ApiRequestTerminatedEventId
SourceContext = ResourceGovernor

CustomData =
[
 {
   "SqlRows": null,
   "CorrelationID": "",
   "ContextID": "",
   "Screen": "~/entity/customendpointname/20.200.002/appointment",
   "ElapsedSeconds": "24",
   "TypeOfRequest": "API/CB",
   "ErrorType": "SqlLimit",
   "CurrentCompany": "Beaver - Production",
   "CustomMessage": "Denial Code 511: System was unable to process the request due to data size limits. Please review your operation and consider requesting a smaller dataset. Contact your provider for further assistance. CorrelationID: ; Timestamp: 2024-04-09T17:35:08.3344069Z"
 }
]

I have tried adding filter, removing expand in the URL, there was no difference in response. I have tried calling the rest api using different ways we could do with httpclient in C#

We would like to add a new record just like the below screenshot, if any alternatives, please suggest.

 


5 replies

Userlevel 7
Badge +4

ContextScreenId = ~/ENTITY/DEFAULTKOLOTECH/20.200.002/APPOINTMENT
ContextUserIdentity = mounish@Beaver - Production
CurrentCompany = Beaver - Production
EventID = ResourceGovernor_ApiRequestTerminatedEventId
SourceContext = ResourceGovernor

CustomData =
[
 {
   "SqlRows": null,
   "CorrelationID": "",
   "ContextID": "",
   "Screen": "~/entity/customendpointname/20.200.002/appointment",
   "ElapsedSeconds": "24",
   "TypeOfRequest": "API/CB",
   "ErrorType": "SqlLimit",
   "CurrentCompany": "Beaver - Production",
   "CustomMessage": "Denial Code 511: System was unable to process the request due to data size limits. Please review your operation and consider requesting a smaller dataset. Contact your provider for further assistance. CorrelationID: ; Timestamp: 2024-04-09T17:35:08.3344069Z"
 }
]

 

This could be related to License Limit and Constraints. Seems to be related to SQL limit.

 

If 200 lines return no error, you could write data in batches of 200 lines per API call.

Badge

@RohitRattan88  We are only adding a single child record to an appointment which has existing 600 child records (Details). The batch processing is not applicable here.

Userlevel 7
Badge +4

@rajeshmishra90 

you could try omitting $expand=Details from your URL:

 https://xxxxx.acumatica.com/entity/customendpointname/20.200.002/Appointment

Badge

@RohitRattan88 Thanks for helping but I think you need to read my question description again once. I already mentioned that I have tried these options.

I have tried adding filter, removing expand in the URL, there was no difference in response.

Userlevel 7
Badge +4

Hi @rajeshmishra90,

As suggested by @RohitRattan88, you can batch the 200 detail lines per request. So for a 600 detail line request, it would 3 requests like below,

Request 1: Create an Appointment with 200 lines

Request 2: Updated the Appointment with 200 more created in Request 1(basically the same request you need to specify the AppointmentNbr in the request payload)

Request 3: Redo step 2 with remaining 200 lines

Hope that clarifies. Please feel free to post if you have any questions.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved