Skip to main content
Solved

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

  • April 11, 2024
  • 5 replies
  • 210 views

Forum|alt.badge.img

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.

 

Best answer by Vignesh Ponnusamy

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.

View original
Did this topic help you find an answer to your question?

5 replies

RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • 253 replies
  • April 11, 2024
rajeshmishra90 wrote:

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.


Forum|alt.badge.img
  • Author
  • Freshman II
  • 11 replies
  • April 12, 2024

@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.


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • 253 replies
  • April 12, 2024

Forum|alt.badge.img
  • Author
  • Freshman II
  • 11 replies
  • April 15, 2024

@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.


Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings