I have 2 NAS running on a SQL-server database (3.60). They run a single-instance codeunit with a timer. So each time the timer is called, the nassql.exe process takes a bit more memory. This goes on and on, so in the end we need to restart the NAS because the server is slowing down too much.
Anyone experienced this before and knows a solution ?
Thanks in advance
0
Comments
clear(MyVar);
If this does'nt help, remove each block of code from the timer, to identify the lines wich causes the problem.
I will try your second hint. Thanks for your reply !
Any suggestions ?
I have an idea that it may be the timers that are the problem. Try to disable the timer and enable it again after you are done in the timer trigger (Im using the navision timer object that comes with Navision). But make sure you enable the timer in the error event aswell
I haven't tried this yet cause of a very big usage of the nases, its quite a process to make changes in this environment
please inform if you test it and tell me how it goes!
/Mathias
Is it possible to post your code?
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
I heve 1 questions about this problem.
1- Wath's the time interval: Sometimes if the timeinterval is to short,
before the first code loop finish, the second one starts and they must
use new memory to continue because the other is in use.
Try this:
Use 2 codeunits
In codeunit 1 (App managenment) you call the first codeunit (Codeunit A). This codeunit is singleuinstance and has the timer funcionality.
The only code you need in codeunit A is to call your second codeunit (Codeunit .
This codeunit isn't singleinstance and you put your automation variables and the rest of code.
I think, if you use this method, when the second codeunit finishes, the memory space will clear.
Bye
I am experiencing the same problem at a customer site where a NAS is running for a webshop. Memory of the server on which the NAS is running slowly fills up and finally they have to restart the server. The automation variables are indeed the guilty ones.
Code is now:
CREATE(AutomationVariable);
ajhvdb suggested to use the already running application or not.
I think what he means is this:
IF ISCLEAR(AutomationVariable) THEN
CREATE(Atomation Variable);
I will let you know if this solves the problem.
Grtz Max
This will create a new automation instance. If the automation does not allow multiple instances and one is running an error will result.