Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Dynamic AX AOS open transaction

(0) ShareShare
ReportReport
Posted on by 5

Hello,

have received some problem that customer reported (just note that I'm a DBA and not application developer). We use Dynamics AX application and after AOS started and 12 hours after this we are getting AOS session is remained with open transaction and X lock on sysserversessions table.

I have checked default EE session to check error_reported event and didn't find any errors, after this I have created EE session to grab rpc_started\completed, sp_statement_completed\started, sql_statement_completed/started + error_reported. I have created an EE session to track events of lock_acquired/released for object SYSSERVERSESSIONS.

For example we are getting such problem 

pastedimage1595452739943v1.png

Usually AOS runs such block of transaction and we have "begin" and "commit" of transaction :

pastedimage1595453226763v4.png

After some time we are getting open transaction that just is not commited and stay open unexpectedly , we just can kill this session. No blockings or deadlocks , no error_reported. What can be a problem ? I didn't find any database signs of problem , can be there application logic issue ? Any help appreciated , sorry if some info there is mis-topic , this problem is headscratching for me now.

  • André Arnaud de Calavon Profile Picture
    294,261 Super User 2025 Season 1 on at
    RE: Dynamic AX AOS open transaction

    Hi Alex,

    I'm not sure if the error is related to the open connection. I have worked with AX versions the past 19 years and never heard of an issue with an open connection. However, in many cases, there is not sufficient SQL server knowledge at a customer or partner. Probably you are the first who could have found an issue. It might be related to a certain kernel version with a bug. You can check if you have the latest kernel versions installed for your AX version here: cloudblogs.microsoft.com/.../

    You can see if updating to the last available kernel for your AX version is solving the issue.

    The AOS error can also be related to a misconfiguration or wrong coding. You can e.g. read about one example here: www.schweda.net/blog_ax.php

  • AlexRND Profile Picture
    5 on at
    RE: Dynamic AX AOS open transaction

    Hello Andre!

    Just translate you first question that was asked by AX admin

    Every AOS during start create thread which initiate separate connection with SQL server. Through this connection AOS updates fields Workload and LastUpdateTime and these updates are performed by separate queries. Field LastUpdateTime is updated once 5 minutes , field Workload is updated more frequently   approximately  in time of new client session is being created. Through this connection there is also reading of data from table SYSSERVERSESSION. Session of SQL server has for this connection has CONTEXT_INFO = «-AOS- 1 CLIENT 0». If we kill this process then AOS generates new connection and CONTEXT_INFO of this process will be «-AOS- 1 CLIENT ХХХ» where ХХX - is just some random value. If we kill this new process then there will be generate new connection like «-AOS- 1 CLIENT ХХХ» just witn another number. Diffrence between first connection «-AOS- 1 CLIENT 0» and «-AOS- 1 CLIENT ХХХ» is that «-AOS- 1 CLIENT ХХХ» does not perfrom updates and just performs selects of SysServerSessions.

    Problem

    AOS starts , and comes to update fields Workload and LastUpdateTime of SysServerSessions using connection «-AOS- 1 CLIENT 0». After some time has passed after start (for portal AOS this ususaly after 2-3 minutes) a process of SQL server with context «-AOS- 1 CLIENT 0»  acquire X lock for row of clustered index index of SYSSERVERSESSION

    table ( that row which contains information about our AOS , and this information should be updated) In information aboud last activity of this MSSQL process we see last activity is select from Sysserversessions. Log of AOS where problem is we are getting constantly error «Object Server 01:  RPC error: Exception 3765269347 occurred in session 1,process: Ax32Serv.exe ,thread: ХХХХ».

    X lock of row is not released , only what we can do is just kill this process. After kill of the process there is created  new process with «-AOS- 1 CLIENT ХХХ» which does not update SYSSERVERSESSION. After 30 minutes another AOS detects that update of field LastUpdateTime was not perfroming some time and  sets for problematic AOS the field STATUS = 0 in table SYSSERVERSESSIONS , after this  problematic AOS sets STATUS to all clients of this AOS. When we try to connect new client to any AOS the client get its minimal number of client session ( from table SysClientSessions) which has STATUS = 0. If this session is "alive" session of problematic AOS then this problematic AOS detects that this session is being used repeatdly and throw the message «Object Server 01:  Unexpected situation. More Information: Session Allocation Failed: Session is already allocated.». After this AOS stops to work.

    -----------------

    From DBA side I see just uncomiited transaction which holds X lock on SYSSERVERSESSION , no any errors from this session was captured , no any deadlocks on the server. SQL server does not leave just open transaction , current behavior which results open transaction can be defined by USER\APPLICATION. What can be a problem ?

  • André Arnaud de Calavon Profile Picture
    294,261 Super User 2025 Season 1 on at
    RE: Dynamic AX AOS open transaction

    Hi Alex,

    Unfortunately, I'm not speaking your DBA language. Can you explain the details what you have provided here? What is an "EE session"? Is the "X lock" causing issues for users in the application? What exactly is the purpose of the screenshots? I'm not able to link your question details to the AX application for now.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,017 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans