I'll check with the folks at MBS I was working with not sure if they got
this fixed in SP4 or not, as I said in my post last year we got around by
limiting our posting to smaller batches, sales orders grouped into 6 meg
files seemed to do the trick. What I noticed is that when Axapta is plowing
through a large number of transactions with out a break the garbage
collector never gets a chance to run, this causes the leak. When I was
debugging my code looking for the exact point of the leak I noticed the
delay in stepping through the code allowed the garbage collector to run so
I'd never see the leak. If you can program a delay between postings, not
sure exactly how much you would need, but you could give the garbage
collector a chance to reclaim memory and keep the memory from creeping so
high.
-Preston
_____
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt Benic
Sent: Wednesday, July 27, 2005 2:58 AM
To: [email protected]
Subject: RE: [development-axapta] Posting Memory Leak
Hi Preston,
I am working with Edine (axapta123456) on this. We have already carried out
the MemSizeUp due to previous memory issues (as she mentions at the end of
the post). This is not the issue. The problem is that we have identified
that there are definitely memory leaks in the posting process leading to a
leak of (on average) 150k with each call to SalesFormLetter.post(), which we
did not notice previously due to the fact that our posting pattern was
different. Basically things have changed as follows due to changed business
requirements:
Before:
-Import batches of 500 Sales Orders into parm tables
-Post all 500 simultaneously
Now
-Import a single invoice 'realtime'
-Post the invoice
As a result, when posting all 20000 invoices using the old method, we would
only leak 20000/500*150k = 6000k = about 6Mb, which is by no means trivial,
but small enough to not cause leak problems too often (though in retrospect
some of our memory issues now make sense.
Now when importing 20000 invoices we are leaking 20000*150k = 3000000k =
about 3Gb!
We are currently running into issues after 3500 invoices, which leaks about
500M, which matches the behaviour on Edine's machine.
We are aware that the SmartHeap garbage collector may eventually reclaim
some of this memory, but by that time we have already experienced out of
memory issues, ie Axapta has already crashed.
Our requirements are that we need to import single invoices and post them
immediately and return the generated voucher numbers. This, combined with
the fact that we cannot have entire batch postings failing due to one
invalid invoices means that we cannot stick to a batched approach of any
kind. We MUST have a 1-1 relation between invoices and posts.
What we want to know is if anyone has written any code to fix this leak, or
if anyone knows how to fix this.
Regards,
Matt Benic
.Net/Axapta Analyst Developer
UTi Sun Couriers Division
Support the Xbox 360 in SA campaign
<http://forums.xbox.com/ShowPost.aspx?PostID=12592431>
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] Behalf Of Preston A.
Larimer
Sent: 26 July 2005 05:33 PM
To: [email protected]
Subject: RE: [development-axapta] Posting Memory Leak
This topic was discussed in the group once before, you can search the group
at yahoo, it is also archived
at http://www.mail-archive.com/development-axapta%40yahoogroups.com/ which
I think is an easier search.
This particular thread is at this link
http://www.mail-archive.com/[email protected]/msg04150.html
Hope it helps you out.
-Preston
_____
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of axapta123456
Sent: Tuesday, July 26, 2005 6:21 AM
To: [email protected]
Subject: [development-axapta] Posting Memory Leak
Hi,
We are still experiencing problems with the standard sales order
posting process in Axapta v3 SP2. It seems as if the standard
posting routine in Axapta has a memory leak that causes Ax32.exe to
crash with an out of memory error. Has anyone of you experienced
this before and do you have any recommendations for us in this
regard? The details are as follows:
We get the SmartHeap Out of Memory error when trying to import and
post individual sales orders from an external system. The invoices
get imported into Axapta and then posted. This posting happens on a
per sales order basis. (Import 1 sales order from the external
system into the temporary posting tables and then post the sales
order) We suspect that this is due to a memory leak in the Axapta
standard posting process. (Class.SalesFormLetter). For each sales
order that is posted, a certain amount of memory is allocated (as can
be seen in the Windows task manager) and added to the total memory
usage of the Ax32 process. Only a small amount of the added memory is
released after the posting process. This cause the total memory
usage of the Ax32 process to keep growing. (Typical memory leak
behaviour). This causes the SmartHeap Out of Memory error after a
variable amount (about 3500) of sales orders were posted. We have
tracked this down to the SalesFormLetter.post() instruction in
Axapta. The posting is run from a client PC and the error occurs in
both 2 and 3-tier mode.
The standard Axapta posting procedure, in SalesFormLetter.run(), is
called for each sales order imported. (The code causes the memory
leak).
The SmartHeapMemorySizeUp() value has been set.
Do anyone have any suggestions in this regard?
Regards,
SPONSORED LINKS
Computer
<http://groups.yahoo.com/gads?t=ms
<http://groups.yahoo.com/gads?t=ms&k=Computer+part&w1=Computer+part&w2=Progr
> &k=Computer+part&w1=Computer+part&w2=Progr
amming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yLpvc
LTIDJ5FTkRJGsO11w> part
Programming
<http://groups.yahoo.com/gads?t=ms
<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Computer+part&
> &k=Programming+languages&w1=Computer+part&
w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.s
ig=cuhEClK4dU4wapXFmKisbQ> languages
Microsoft
<http://groups.yahoo.com/gads?t=ms
<http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Computer+part&w2=Pr
> &k=Microsoft+axapta&w1=Computer+part&w2=Pr
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yf
eG_U6QaLfPOZZIud02Fg> axapta
Support
<http://groups.yahoo.com/gads?t=ms
<http://groups.yahoo.com/gads?t=ms&k=Support+exchange&w1=Computer+part&w2=Pr
> &k=Support+exchange&w1=Computer+part&w2=Pr
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=hy
8yRGMzrmxdphyITTUeqA> exchange
_____
YAHOO! GROUPS LINKS
* Visit your group "development-axapta
<http://groups.yahoo.com/group/development-axapta> " on the web.
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.
_____
[Non-text portions of this message have been removed]
Yahoo! Groups Links
SPONSORED LINKS
Computer
<http://groups.yahoo.com/gads?t=ms&k=Computer+part&w1=Computer+part&w2=Progr
amming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yLpvc
LTIDJ5FTkRJGsO11w> part
Programming
<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Computer+part&
w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.s
ig=cuhEClK4dU4wapXFmKisbQ> languages
Microsoft
<http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Computer+part&w2=Pr
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yf
eG_U6QaLfPOZZIud02Fg> axapta
Support
<http://groups.yahoo.com/gads?t=ms&k=Support+exchange&w1=Computer+part&w2=Pr
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=hy
8yRGMzrmxdphyITTUeqA> exchange
_____
YAHOO! GROUPS LINKS
* Visit your group "development-axapta
<http://groups.yahoo.com/group/development-axapta> " on the web.
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.
_____
[Non-text portions of this message have been removed]
SPONSORED LINKS
| Computer part | Programming languages | Microsoft axapta |
| Support exchange |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

