AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

xml parser error : out of memory error

  • 1.  xml parser error : out of memory error

    Posted Tue March 20, 2018 05:39 PM

    Originally posted by: tuccero


    Hello,

     

    I have an AIX 6.1 server and i experienced a parser error while processing an xml file recently.

    This is the error that i get:

    ++ERROR, Message Not Found Number : 625076 '/tmp/20180316093501706000'):

    parser error : out of memory error

    <filename>: parser error : out of memory error

    parser error : out of memory error

    <filename>: parser error : out of memory error

     

    The above error is produced by a script that uses the tool

    xmllint
    

    to process the file.

     

    Here is what the script does:

     

    if [ -z "$3" ]
    then
       FILE_TMP=/tmp/tmp
    else
       FILE_TMP=/tmp/$3
    fi
    
    xmllint --noout --schema $2 $1 2> $FILE_TMP;
    ERR=$?
    case $ERR in
      127) echo 127;;
       0) echo 0;;
       *) echo $FILE_TMP;;
    esac
    

    This script is executed daily and i never had this problem before. I experienced this problem while processing a  specific file. Note also that in the days after that error the script is executed fine without producing any error.

    For this reason i transfered the same file to another AIX 6.1 server (testing server) trying to reproduce the problem and identify the root of it. The strange thing is that on my testing server i didnt had any error and the file was processed successfully.

    Judging by the description of error message (out of memory) i dont believe that the problem is insufficient memory in server since my testing server has a lot fewer resources than production server.

    I suspect that maybe there is some kind of limit that needs tuning? I dont know what else to think at the moment.

     



  • 2.  Re: xml parser error : out of memory error

    Posted Wed March 21, 2018 08:07 AM

    Originally posted by: AncientAIXer


    You're probably right about limits.  There are several limits placed on a user.  One, of course, is the amount of memory your server has.  You said that this is not the case.  One is from the system, and another from certain programming languages such as Java.  If I remember correctly, xmllint is a C program so it should not have any program limit.  That leaves the user limits of the user that runs the script, whether manually or via cron.  As the user in question, run 'ulimit -a' and pay attention to data, stack and memory.  I would compare between the 2 servers you tried.



  • 3.  Re: xml parser error : out of memory error

    Posted Wed March 21, 2018 10:09 AM

    Originally posted by: tuccero


    Hello,

     

    You are right!

    I compared the limits of the 2 users as you mentioned (user1 on production server, user2 on testing server) and i noticed that limit for "data(kbytes)" were different.

    So i changed this limit of user on production server and processed the file which was causing the error before.

    The file was processed successfully.

    Thank you very much for your help.