ax32serv.exe doesn't release memory

We developed Planned Order importing system using csv files. Our client is using this system through batch jobs.

But client said there are memory problem. So we monitored memory usage of server while importing Planned Order and found that usage memory of ax32serv.exe become extremely high(about 3GB after importing 15,000 records).

So we thought there will be memory leak issue on code, but we also found that after full CIL, ax32serv.exe memory usage become very high, and doesn’t release memory.…/82994

I googled about this issue and found it’s already discussed issue, and hotfix has already been issued. So i suggested install this hotfix but administrator told CU version is latest so this hotfix is already installed.

Then, what’s the main cause of this poor memory control? Is it normal ax32serv.exe uses about 3GB memory after works using heavy memory?

p.s : Because of the out of memory issue of our client, we are using GC.collect method on importing system. I know its a terrible way, but anyhow, out of memory issue doesnt show up from that time. Any good idea?

p.s2 : the version of server is 6.2.1000.8416

If it happens only in your process, you probably have a bug there. Most likely, you hold the content of CSV files in memory.


Thanks for your reply.

We also think there are leak issue in our code.

However, the problem is “Server doesn’t release memory after full CIL generation, which is made by Microsoft”.

We tested full CIL generation on test server computer(8GB Memory), and above is the result.

As you can see, memory usage of AX32SERV.exe is about 4GB. And NEVER goes down. Just keep rising.


It goes down. but very slowly. about 10kb per sec

Then SQL Server memory usage keep going low (to manage memory usage of server, I think).

When this horrible memory management reach the limit, performance of server become very slow.

Then we cannot help to restart the server.

The point is, our importing system is not the only consume memory, but also other heavy works like CIL generation does.

And AX32SERV.exe never release that consumed memory.

Setting a limit of memory usage of AOS can be a solution?


Aha, so the whole thing about CSV import is not related to your question. Sorry, I didn’t expect that.

First of all, don’t run CIL compilation in production, so it can’t cause any problems there.

Secondly, I recommend that you restart your AOS after CIL compilation. It’s just one extra line in your release script, or how you exactly do it.


Thanks for your suggestion.

Restart can be a good solution. We suggested our client to restart the server after heavy-memory-consuming-works.

So far so good. But I am still investigating leak issue in the importing code.


Then you should debug your code, possibly with a memory profiler on hand. I can’t comment on your code because I’ve never seen it.