NAS taking more and more memory

Johnny_ReggaeJohnny_Reggae Member Posts: 63
edited 2009-06-11 in Navision Attain
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

Comments

  • hlohmillerhlohmiller Member Posts: 1
    try to clear all automation varables your created in the timer-function at the end of the function.

    clear(MyVar);

    If this does'nt help, remove each block of code from the timer, to identify the lines wich causes the problem.
  • Johnny_ReggaeJohnny_Reggae Member Posts: 63
    I already cleared all automation variables in the end, so that can not be the problem.
    I will try your second hint. Thanks for your reply !
  • Johnny_ReggaeJohnny_Reggae Member Posts: 63
    After testing the code, I come to the conclusion that the Automation variables are the guilty ones. Every time I use such a variable the memory builds up. Clearing the variable has no effect....
    Any suggestions ?
  • ajhvdbajhvdb Member Posts: 672
    Isn't there a parameter when creating the automation var to use an existing one?
  • Johnny_ReggaeJohnny_Reggae Member Posts: 63
    Not that I know of
  • ajhvdbajhvdb Member Posts: 672
    But I remember when using Word automation you can say to use the already running application or not. Sorry for giving you hope..
  • wmmasjwmmasj Member Posts: 10
    I have the same problem with a couple of nases that runs using single instance and timers.

    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
  • WaldoWaldo Member Posts: 3,412
    After testing the code, I come to the conclusion that the Automation variables are the guilty ones. Every time I use such a variable the memory builds up. Clearing the variable has no effect....
    Any suggestions ?

    Is it possible to post your code?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • SaalekSaalek Member Posts: 181
    Hi

    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 B).
    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
  • MaximusMaximus Member Posts: 105
    Hi,

    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
  • bbrownbbrown Member Posts: 3,268
    This will reuse the existing automation instance
    CREATE(MyAutomation, FALSE)
    

    This will create a new automation instance. If the automation does not allow multiple instances and one is running an error will result.
    CREATE(MyAutomation, TRUE)
    
    There are no bugs - only undocumented features.
Sign In or Register to comment.