Studio project creation outofmemoryexception - usage of memory in AutomaticTasks such as Analyze or Convert

Dear community,

I am batch creating Studio projects via a command line tool and noticed that at some point, e.g. when creating hundreds of (small) projects, I get an outofmemoryexception, I assume directly from the 32bit CLR (when memory usage has almost reached the allowed 1.8 GB). As a quick workaround, I have put the actual project creation into a separate command line application which I now trigger from the main app. Since the separate cmd is killed after project creation, I thereby enforce memory release. However, this experience makes me think that Automatic Tasks such as Convert and Analyze are maybe not releasing enough unused memory for the GC to collect and the memory usage should be profiled again?

Anybody else reached this limit?

Best wishes,
Simon

Parents
  • I must admit that I have encountered issues like this (a few years back) when first implementing the Project Automation API, but resolved them when ensuring that I always create a new using instance of a class that encapsulates the references and methods for the API calls + release any collections in the process. I guess it is basically the same approach that you are accomplishing now by creating a new instance each time you launch create a new project via cmd bat file and any objects that are used in the process.

    You could also try telling the GC to ‘hey’… clean up the garbage via GC.Collect() if you have released the collections etc… but I know that this has a performance penalty as it is doing *something* where it normally wouldn’t.

    This probably doesn’t answer your question but thought that it might be useful nevertheless.
    Ciao,
    P.
Reply
  • I must admit that I have encountered issues like this (a few years back) when first implementing the Project Automation API, but resolved them when ensuring that I always create a new using instance of a class that encapsulates the references and methods for the API calls + release any collections in the process. I guess it is basically the same approach that you are accomplishing now by creating a new instance each time you launch create a new project via cmd bat file and any objects that are used in the process.

    You could also try telling the GC to ‘hey’… clean up the garbage via GC.Collect() if you have released the collections etc… but I know that this has a performance penalty as it is doing *something* where it normally wouldn’t.

    This probably doesn’t answer your question but thought that it might be useful nevertheless.
    Ciao,
    P.
Children