NAV2016 - Long wait after having reached 100% when posting G/L Journal
                
                    pdj                
                
                    Member Posts: 643                
            
                        
            
                    When I'm posting a G/L Journal with 8000 lines, then NAV nicely updates the progress bar the first 50 seconds and reaches 100%.
Then NAV freezes for about 8-9 minutes without any sign of life, before it tells me it is done.
I have tried to troubleshoot with the Application Profiler, but it has a top-level dummy SQL statement which it claims is accountable for 7-8 minutes. The rest is the basic posting, which seems ok. I then guessed it would be the buffered insert, but disabling that for the NAV Service Tier doesn't change anything.
Any good ideas before I try troubleshooting using the SQL-Profiler?
(At the customer test site it is even worse. The exact same journal takes appr. 5 minutes to reach 100% and then freezes for appr. 45 minutes.)
                Then NAV freezes for about 8-9 minutes without any sign of life, before it tells me it is done.
I have tried to troubleshoot with the Application Profiler, but it has a top-level dummy SQL statement which it claims is accountable for 7-8 minutes. The rest is the basic posting, which seems ok. I then guessed it would be the buffered insert, but disabling that for the NAV Service Tier doesn't change anything.
Any good ideas before I try troubleshooting using the SQL-Profiler?
(At the customer test site it is even worse. The exact same journal takes appr. 5 minutes to reach 100% and then freezes for appr. 45 minutes.)
Regards
Peter
Peter
0                
            Best Answer
- 
            A friend found this link for me: https://community.dynamics.com/nav/f/34/t/186493
It turns out the event subscribers are causing the problems. I ended up deleting the following subscriber functions and got a proper performance again:
Codeunit 1535: DeleteApprovalCommentsAfterDeleteGenJournalLine()
Codeunit 1535: DeleteApprovalEntriesAfterDeleteGenJournalLine()
Codeunit 1550: PostApprovalEntriesMoveGenJournalLine()
Codeunit 1550: CustomerCheckGenJournalLinePostRestrictions()
Codeunit 1550: GenJournalBatchCheckGenJournalLinePostRestrictions()
Codeunit 1550: GenJournalLineCheckGenJournalLinePostRestrictions()
Codeunit 1550: RemoveGenJournalLineRestrictionsBeforeDelete()
Codeunit 1550: RestrictGenJournalLineAfterInsert()
Codeunit 1550: RestrictGenJournalLineAfterModify()
(I simply used the List of Event Subscriptions to find those called many times)
Pretty sad :-( I was just getting fond of the Workflow feature, but it is almost useless when it affects the performance like this.Regards
Peter6 
Answers
- 
            A friend found this link for me: https://community.dynamics.com/nav/f/34/t/186493
It turns out the event subscribers are causing the problems. I ended up deleting the following subscriber functions and got a proper performance again:
Codeunit 1535: DeleteApprovalCommentsAfterDeleteGenJournalLine()
Codeunit 1535: DeleteApprovalEntriesAfterDeleteGenJournalLine()
Codeunit 1550: PostApprovalEntriesMoveGenJournalLine()
Codeunit 1550: CustomerCheckGenJournalLinePostRestrictions()
Codeunit 1550: GenJournalBatchCheckGenJournalLinePostRestrictions()
Codeunit 1550: GenJournalLineCheckGenJournalLinePostRestrictions()
Codeunit 1550: RemoveGenJournalLineRestrictionsBeforeDelete()
Codeunit 1550: RestrictGenJournalLineAfterInsert()
Codeunit 1550: RestrictGenJournalLineAfterModify()
(I simply used the List of Event Subscriptions to find those called many times)
Pretty sad :-( I was just getting fond of the Workflow feature, but it is almost useless when it affects the performance like this.Regards
Peter6 - 
            There is a performance fix for this now:
https://markbrummel.wordpress.com/2016/10/03/performance-issue-with-workflow-solution/
with best regards
Jens-1 - 
            Good work.0
 - 
            There is a performance fix for this now:
https://markbrummel.wordpress.com/2016/10/03/performance-issue-with-workflow-solution/
with best regards
Jens
I do not know why what's wrong with my code, but the issue is still persist.A friend found this link for me: https://community.dynamics.com/nav/f/34/t/186493
It turns out the event subscribers are causing the problems. I ended up deleting the following subscriber functions and got a proper performance again:
Codeunit 1535: DeleteApprovalCommentsAfterDeleteGenJournalLine()
Codeunit 1535: DeleteApprovalEntriesAfterDeleteGenJournalLine()
Codeunit 1550: PostApprovalEntriesMoveGenJournalLine()
Codeunit 1550: CustomerCheckGenJournalLinePostRestrictions()
Codeunit 1550: GenJournalBatchCheckGenJournalLinePostRestrictions()
Codeunit 1550: GenJournalLineCheckGenJournalLinePostRestrictions()
Codeunit 1550: RemoveGenJournalLineRestrictionsBeforeDelete()
Codeunit 1550: RestrictGenJournalLineAfterInsert()
Codeunit 1550: RestrictGenJournalLineAfterModify()
(I simply used the List of Event Subscriptions to find those called many times)
Pretty sad :-( I was just getting fond of the Workflow feature, but it is almost useless when it affects the performance like this.
I just delete 3 subscriber, then it works. Must delete the subscriber, not just remark the code:
COD 1550
RemoveGenJournalLineRestrictionsBeforeDelete
COD 1535
DeleteApprovalEntriesAfterDeleteGenJournalLine
DeleteApprovalCommentsAfterDeleteGenJournalLine
Regards,
Andwian0 
Categories
- All Categories
 - 73 General
 - 73 Announcements
 - 66.7K 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
 - 323 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
 
