The transaction active in this session has been committed or aborted by another session.

sadjad_1234@live.sesadjad_1234@live.se Member Posts: 12
edited 2017-11-09 in NAV Three Tier
Hi!
I have a not so strange error, I think I understand the problem/error but the problem is that I don't really know how to solve it. Spend almost 1,5 day without any kind of solution. Mostly because I have a hard time to identify when, what and how the connection gets prematurely committed or aborted.

Let me give you some technical information.

This is the event error I get, I'll get it about 10-20 times per day per Point Of Sales System:
0lX2IB8.jpg

This is the specific part of code which seems to generates the Event Error:
87v6d80.png

This is where the C/AL snippet above is placed:
ju7dC3M.png

***NOTE: The whole codeunit is has the property SingleInstance set to Yes***

Any Ideas? If you can guide me it would be very kind of you and very interesting. The system we are running is NAV 2013 R2 with LS Retail! i Got 2 years of NAV so don't mock me.

I have done a lot of testing and documentation regarding recreation of the problem without any success. If I can't recreate the problem, I can't solve it but I hope that someone can see some kind of obvious mistake I have missed or point out where to look.

I got 2 years of NAV experince, kind of Junior but i'm not totally dumb. I have a background within C# so I know that some kind of SQL-Connection is static and not instantiated.

Comments

  • KTA8KTA8 Member Posts: 397
    have you tried a commit before that code?
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Perhaps it happened after long period of inactivity when the client has been disconnected and reconnected again?

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • sadjad_1234@live.sesadjad_1234@live.se Member Posts: 12
    KTA8 wrote: »
    have you tried a commit before that code?

    I can't reproduce the error in the DEV/TEST Environment and the error only occurs in PROD which means that I need to put the COMMIT in the PROD Enviroment which is not possible to do that without being tested in TEST/DEV first.
    Perhaps it happened after long period of inactivity when the client has been disconnected and reconnected again?

    Slawek

    You mean something like this?
    1. Open POS and do something that execute that code-snippet(starting the transaction)
    2. Wait for xMinutes and session gets hijacked, committed or closed somehow
    3. Resume the transaction and the error generates
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2017-11-10
    You mean something like this?..
    1. Open POS and do something that execute that code-snippet(starting the transaction)
      ...
    Pretty much.

    This is the only scenario I can of think where sessions could be be switched.

    Also - take into account that it can be one-off error, casued by some internal NST or Client code went bonkers. Or the software or hardware infrastructure somewhere along the way.

    If you're running NAV for long period of time and this is the first time you see such an error in the Event Log it is possible.

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Sign In or Register to comment.