web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AIF - Memory Exception..

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm trying to send Sales table records from AX through AIF Document Service in AX 2009

Im getting Insufficient Memory issue...

I saw some previous posts and blogs and changed the registry vale(traceMaxbufferSize) to Zero(No Limit)..

Still getting the same issue..In Basic->Services->Configure-> i have changed the Max buffer size from 65536(64KB) to 1048576(10240KB) and increased the time-out too..i can able to send 1000 records but when trying for 1500 im getting this issue......Please give some tips to come out of this issue...

Thanks in advance

Raja

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    The following thread may help: AIF outbound message limitation.

  • Community Member Profile Picture
    on at

    Hi Martin,

    I have already tried that method to limit the document count to 1000..

    But the problem here is i want to send a minimum if 1500-2000 documents.....

    Thanks,

    Raja

  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    I thought would change the setup.

    Either switch Limitation type to Specified and change the number or set Limit number of documents to No.

  • Community Member Profile Picture
    on at

    Hi Martin,

    I don't want to limit the number of records. So i set No to limit number of documents..then i will face Insufficient Memory issue...

    My Exact requirement is i have 5L records in Sales Table and based on RLS i'm trying to pull data from AX to Android Application...At that time for some user groups i'm facing this issue..

    Please Advice

    Thanks,

    Raja

  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    Great! We resolved the problem with the limit of records. Now let's look at the one with insufficient memory.

    I suppose you got "Insufficient memory to run script". (By the way, could you please provide exact error messages next time? It also may be a buffer size limit in WCF.) 

    In theory, you could modify the memory limit (as documented on the Technical Support Blog), nevertheless if you're trying to return thousands of documents, the message will be by far too big. You should use more smaller messages.

  • Community Member Profile Picture
    on at

    Hi Martin,

    The Exact Error Msg..

    Error executing code: Insufficient memory to run script.

    

    (S)\Classes\XmlTextWriter\writeToString

    (S)\Classes\AxdXmlWriter\getXML - line 9

    (S)\Classes\AxdBaseRead\serializeDocument - line 50

    (S)\Classes\AxdBaseRead\findDocumentList - line 14

    (S)\Classes\AxdBase\findList - line 65

    (S)\Classes\AifDocumentService\findList - line 38

    (S)\Classes\KTI_SalesSalesOrderListService\find - line 4

    (S)\Classes\DictClass\callObject

    (S)\Classes\AifDispatcher\callServiceMethod - line 60

    (S)\Classes\AifDispatcher\dispatchOperation - line 11

    (S)\Classes\AifRequestProcessor\executeServiceOperation - line 20

    (S)\Classes\AifRequestProcessor\processServiceRequest - line 101

    (S)\Classes\AifRequestProcessor\processServiceMessageXml - line 58

    Things i have done..

    1) Changed the Maxbuffersize in basichttpbinding(services->configure)

    2) In VS 2010 also for that service i have increased the buffersize, timeout

    3) Registry Value of the server to 0..

  • Community Member Profile Picture
    on at

    The solution Martin linked should work. But you need to set the registry value for both the AOS and the business connector. If you want to be able to view these messages in the client you would also need to set the registry value for the client.

    I would however not recommend setting this to 0 (unlimited) in a production environment since it could lead to out of memory issues (depending on your system). Experiment in a dev/test environment to find a value that fits you.

    Also note that the AIF works better sending many smaller messages than one big message.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans