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

sadjad_1234@live.se
Member Posts: 12
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:

This is the specific part of code which seems to generates the Event Error:

This is where the C/AL snippet above is placed:

***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.
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:

This is the specific part of code which seems to generates the Event Error:

This is where the C/AL snippet above is placed:

***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.
0
Comments
-
have you tried a commit before that code?0
-
Perhaps it happened after long period of inactivity when the client has been disconnected and reconnected again?
SlawekSlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
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.Slawek_Guzek wrote: »Perhaps it happened after long period of inactivity when the client has been disconnected and reconnected again?
Slawek
You mean something like this?- Open POS and do something that execute that code-snippet(starting the transaction)
- Wait for xMinutes and session gets hijacked, committed or closed somehow
- Resume the transaction and the error generates
0 -
sadjad_1234@live.se wrote: »You mean something like this?..
- Open POS and do something that execute that code-snippet(starting the transaction)
...
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-030 - Open POS and do something that execute that code-snippet(starting the transaction)
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions