Large AIF xml file - Insufficient memory to run script

Hello,

I have a problem with large AIF xml file ( in AX2009 ). There is a error message :

"Error executing code: Insufficient memory to run script.

(S)\Classes\AifInboundProcessingService\getMessage - line 14
(S)\Classes\AifInboundProcessingService\processAsyncRequest - line 38
(S)\Classes\AifInboundProcessingService\processAsUser - line 25"

I have update the registery key maxbuffersize on the AOS without success . I then put it to 0 ( for the test ) and the error still appear. ( AIF is launch with batch job ) .

Any idea ?

Thanks.

You can learn more about the error in my blog post.

The right solution is splitting your large message to several smaller ones.

Split file is not possible in my development.
When I change status of AIF message error → ready, the message is treated with no error sometimes … !

Why it’s not possible?

Is it possible with a .xslt transformation to generate multiple file ?

Yes, it’s possible. Read Generate multiple output documents using XSLT, for example. Or you can any other technique for working with XML files or change the way how you generate the message. I can’t be any more specific without more information from you.

But its not always the biggest files that are in error. A file of 5 MB is in error while a file of 12 MB is correctly imported.

If you want to analyze your problem in detail, you can use techniques demonstrated in my article . But I wouldn’t bother if I was you; I would go with aforementioned suggestions.

I have split large message and now it work fines. But I have another problem. I have 4 AIF service that update multiple table and a same table.
I got the message “Cannot select a record in ChacalFolderControl (ChacalFolderControl).
Deadlock, where one or more users have simultaneously locked the whole table or part of it.” .
The code is :
try
{
select pessimisticlock tNomRepere from chacalfoldercontrol where chacalfoldercontrol.tNomDossier ==
chacalbom.tNomDossier && chacalfoldercontrol.tNomRepere == chacalbom2.tNomRepere;
if (chacalfoldercontrol.tNomRepere != ‘’)
{
ttsBegin;
chacalfoldercontrol.POKComposant = true;
chacalfoldercontrol.update();
ttsCommit;
}
else
{
ttsBegin;
chacalfoldercontrol.tNomDossier = chacalbom.tNomDossier;
chacalfoldercontrol.tNomRepere = chacalbom2.tNomRepere;
chacalfoldercontrol.POKComposant = true;
chacalfoldercontrol.insert();
ttsCommit;
}

}
catch(Exception::Deadlock)
{
retry;
}

But the"retry" seems not work . Is there anyway to avoid this deadlock message ?

Thanks.

As this is a different topic, please move your new question to a new thread and close this one.