Skip to main content



No record found.

Microsoft Dynamics AX forum

Dynamic AX AOS open transaction

Posted on by 5


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 


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


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
    André Arnaud de Cal... 287,773 Super User 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:

    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:

  • AlexRND Profile Picture
    AlexRND 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.


    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
    André Arnaud de Cal... 287,773 Super User 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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,773 Super User

Martin Dráb Profile Picture

Martin Dráb 225,513 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans