Solved

Occassionally, API call returning null for all Usr fields.

  • 28 September 2023
  • 10 replies
  • 76 views

Userlevel 7
Badge +5

We have an external system that makes REST API calls to the SalesOrder endpoint. Every once in a while the resulting JSon has null for all Usr fields.  I can refresh the data and the result will have all field values.

The other day we added code in the graph extension’s initialization routine to access some custom fields in a setup table.  Then we started to see the occasional error because those calls to GetExtension were failing. But only once in a while. But when they started to fail, they continued to fail, over and over, for a period of time. Sometimes we restarted Acumatica, sometimes the error just went away.

I removed the code from the initialization routine and things were better.

Doing some stress testing today, forcing ACM to send me the GET result from the order over and over, we’d get to a point where the JSon result was showing null values in all custom fields. The base fields still contained data. No change to the underlying transactional data - just sending multiple GET requests with the same http connection.

It’s like the graph extensions didn’t get loaded and thus the various views didn’t know what the custom fields were and so the result was null.

Has anyone seen this happen with the REST API?

icon

Best answer by Dmitrii Naumov 29 September 2023, 16:44

View original

10 replies

Userlevel 7
Badge +5

Update:

I have have two of my windows open. If I press F5 to force a requery on one screen and before it finishes, I press F5 on the other, I’ll get the erroneous query results, but only on one of the calls.

And the time for these bad result sets is very quick.

Userlevel 7
Badge +4

@Django 

I am currently working on a related issue. It is still under investigation, and I will probably have some findings to share in a week or two.

Userlevel 7
Badge +5

Thank you @RohitRattan88 - let me know if I can help in any way.

Userlevel 7
Badge +5

Just to add some more details. I notice that the Request Profiler indicates that the SQL Count column is a little more than double what it should be when the error happens.

 

Userlevel 7
Badge +4

Thank you @RohitRattan88 - let me know if I can help in any way.

@Django thank you for offer. I will reach out to you if needed

Just to add some more details. I notice that the Request Profiler indicates that the SQL Count column is a little more than double what it should be when the error happens.

 

that is interesting. thanks for pointing it out.

Userlevel 7
Badge +5

@Django which version are you trying with?

We had a similar issue in some 22r1 versions. 

 

If you are on something like 22r1 Update 15, I recommend you to upgrade to the latest 22r1 and try again.

Userlevel 7
Badge +5

@RohitRattan88 - yes, I noticed this. I have the Request Profiler results for a successful result and an unsuccessful result. When the issue appears, the Note table is queried by itself multiple times but when the process works the Note table is never queried by itself.  I’m going to document the differences between a good result and a bad result so that’s available.

@Dmitrii Naumov - this is version 22.213.0010

As I said, I can reproduce this at will and it is on the acumatica.com saas environment, so if I can help, I’d be happy to assist.

Userlevel 7
Badge +5

@Django  the  22.213.0010 may also be affected. I’d recommend upgrading to at least 22.215.0056.

Userlevel 7
Badge +5

@Dmitrii Naumov - In our saas sandbox environment we upgraded to 22.218.023.  I’ve sends hundreds of async requests through the API over the course of a couple of minutes

100% success rate.

Thank you for the suggestion!

I did notice that the profiler indicates rows with higher SQL counts but the proper data is being returned.

@RohitRattan88 Just in case it helps your investigation, on 22.213, when I had failures, the details under the Logged SQL Count column included a high number of calls to the Note table (screenshot below). But, when I had successes - there were zero calls that only were for the Note table. (But success and failures make calls to Note,NoteDoc,SOLine, etc)

After the update to 22.218 even my high Logged SQL Count data does not include any calls that are only to the Note table.

 

Userlevel 7
Badge +4

@Django great. thanks for sharing your findings.

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