Terminate too long running process

nXqd
Member Posts: 39
I'm looking for a way to terminate a process which takes too much time to run ? Is there any way I can get this done ?
Let's take requesting to a webservice as an example: I expect one request should not exceed 3 minutes to get the result back. One would be marked as "Delay" if its request exceed the time limit.
I know we can solve this by limiting the request time, timeout time of service. But I'm looking for a more generic way, so it will help for another tasks as well.
Thanks for reading
Let's take requesting to a webservice as an example: I expect one request should not exceed 3 minutes to get the result back. One would be marked as "Delay" if its request exceed the time limit.
I know we can solve this by limiting the request time, timeout time of service. But I'm looking for a more generic way, so it will help for another tasks as well.
Thanks for reading

0
Answers
-
Please clarify "process"No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Luc Van Dyck wrote:Please clarify "process"0
-
I am not sure if i understand well the question but what i know you can control it:
- on the client side in the case of async. call -> set yourwsclient.Timeout parameter,
- on the server side -> setting of the OperationTimeout of your web service CustomSettings.config file.0 -
koubek wrote:I am not sure if i understand well the question but what i know you can control it:
- on the client side in the case of async. call -> set yourwsclient.Timeout parameter,
- on the server side -> setting of the OperationTimeout of your web service CustomSettings.config file.
Like I said before, we can control it by setting the timeout in webservice setting. I'm thinking about another process like reading file, loading file, any process that can take long time to run. Like reading file, we can't config it externally. So thinking about navision, can we do this programmatically ?0 -
The question is why your process does not end within 3 minutes if you expect it... And on the other hand, if the process runs longer but works correctly why would you like to terminate it?
Anyway, if you know what session your process is you can terminate it from another one if you need it. You can control it by the NAV code of course. Moreover when you run specific function as WS method you can control processing time inside NAV directly within the process itself...
All of this depends what exactly do you need... You should describe better your requirements to understand all details of your wishes0 -
koubek wrote:The question is why your process does not end within 3 minutes if you expect it... And on the other hand, if the process runs longer but works correctly why would you like to terminate it?
Anyway, if you know what session your process is you can terminate it from another one if you need it. You can control it by the NAV code of course. Moreover when you run specific function as WS method you can control processing time inside NAV directly within the process itself...
All of this depends what exactly do you need... You should describe better your requirements to understand all details of your wishes
It's great that I have someone follow my question this long since I don't describe my question clear and understandable enough. But due to your answer,And on the other hand, if the process runs longer but works correctly why would you like to terminate it?Moreover when you run specific function as WS method you can control processing time inside NAV directly within the process itself...
Thanks for reading.0 -
Example:
Function start Save the current date time loop through the file for each read check if curent date time > starting one + 3 minutes if yes, error('Too long process'); else continue in process
In each process, when something is long, it means that there is loop, whcih should end after some time. This you can check inside the loop. You cannot do that only if you are calling external function which is atomic for you and it itself take too long.0 -
kine wrote:In each process, when something is long, it means that there is loop, whcih should end after some time. This you can check inside the loop.kine wrote:You cannot do that only if you are calling external function which is atomic for you and it itself take too long.0
-
koubek wrote:kine wrote:In each process, when something is long, it means that there is loop, whcih should end after some time. This you can check inside the loop.kine wrote:You cannot do that only if you are calling external function which is atomic for you and it itself take too long.
Thanks you and kine for great answer and explanation. Thinking about aborting atomic funciton in nav, I think it's not possible at the moment and use case is rare. I will mark this as solved0
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