Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Facing an error in job queue

(0) ShareShare
ReportReport
Posted on by 210
I have a job queue which basically fetches data from third-party software and stores in business central. This table in businesss central has around 439 fields so this job queue takes a lot of time. Meanwhile, we are storing all fetched data from API call inside json buffer table. But for up to 5000 records, it is running fine but for more than that it is showing following error:
We can't save your changes right now, because a record in table 'JSON Buffer' is being updated in a transaction done by another session.

You'll have to wait until the other transaction has completed, which may take a while. Please try again later.


We have also increased job timeout to 18 to 23 hours still it is failing within 11 hours. No user has been working on the table as well.



  • Pragya752 Profile Picture
    Pragya752 210 on at
    Facing an error in job queue
    I have set one record per page only.
     
    Pagingobject.Add('PageIndex', PageIndex);
            Pagingobject.Add('PageSize', LSQSetp.PageSize);
            JObject.Add('Paging', Pagingobject);
     JObject.Add('Columns', IncludeCSVObject);
            SortingObject.Add('ColumnName', 'CreatedOn');
            SortingObject.Add('Direction', 1);
            JObject.Add('Sorting', SortingObject);
      if Response.IsSuccessStatusCode then begin
                Response.Content().ReadAs(ResponseText);
                //Message(ResponseText);
                JsonBuffer.Reset();
                if JsonBuffer.FindSet() then
                    JsonBuffer.DeleteAll();
                jsonBufferTemp.ReadFromText(ResponseText);
                if jsonBufferTemp.FindSet() then
                    repeat
                        JsonBuffer := jsonBufferTemp;
                        JsonBuffer.Insert();
                    until jsonBufferTemp.Next() = 0;
  • Suggested answer
    KasparsSemjonovs Profile Picture
    KasparsSemjonovs 3,973 Super User 2024 Season 2 on at
    Facing an error in job queue
    Sankar P is correct. Paging should solve the issue. 
    It is know that Business Central limits queries or records to 5000. Similar as You cannot export to excel more than 5000 lines. In NAV it was possible to change this limit in ClientUserSettings file, but for BC not sure if it can be done via CMDLETs. You can explore in this direction.
  • Facing an error in job queue
    Hi,
    Ìs it possible to do pageing in your API and read <5K records at a time to process and store it and use commit before u call for next pageing.
     
     
  • Judy Profile Picture
    Judy Microsoft Employee on at
    Facing an error in job queue
    Hi,
     
    Have you tried to restart the environment? Please restart the Job related and restart the API rest and run it again to see if the error occurred.
    The following Document help you troubleshoot issues with Business Central so that you can gather information about a given problem, identify the cause of the problem, and eventually implement a sustainable solution
     
     
     
    Best Regards,
    Judy

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans