help: MQJMS1016E java.lang.OutOfMemeoryError - Websphere

This is a discussion on help: MQJMS1016E java.lang.OutOfMemeoryError - Websphere ; I have encountered the following error when using Websphere MQ 5.3 CSD10: MQ encounter MQJMS1016E internal error,please contact your system administrtor. detail message: java.lang.OutOfMemeoryError Does anyone know the reason, how to resolve it? ps: I use the JMS pub/sub mode ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: help: MQJMS1016E java.lang.OutOfMemeoryError

  1. help: MQJMS1016E java.lang.OutOfMemeoryError

    I have encountered the following error when using Websphere MQ 5.3 CSD10:
    MQ encounter MQJMS1016E internal error,please contact your system administrtor.
    detail message: java.lang.OutOfMemeoryError

    Does anyone know the reason, how to resolve it?
    ps: I use the JMS pub/sub mode to listener on MQ topic, but the subscriber side occurs the above error after 24 hours.
    The received message size is 10k and delivered with ObjectMessage type. Message arrived frequency is about 2-3 per second.


  2. Re: MQJMS1016E java.lang.OutOfMemeoryError

    Guangmao,

    The error suggests that you are out of heap. The Garbage Collector couldn't
    free heap memory for the application.

    Most JVMs have an option of "-Xms -Xmx", when you kickoff the java
    process, where n is starting/lower-limit of the heap space and m is the
    upper-limit for the heap space, for example,

    -Xms512m -Xmx1g or
    -Xms128m -Xmx128m etc.

    Depending on the app usuage select optimum heap size, most defaults can be
    fairly small.

    For more info see,

    http://www-128.ibm.com/developerwork...ry/i-garbage1/
    http://www-128.ibm.com/developerwork...ry/i-garbage2/
    http://www-128.ibm.com/developerwork...-garbage3.html
    http://www-128.ibm.com/developerwork...ary/i-gctroub/

    Regards,
    Saket

    wrote in message
    news:1115719347.1141046452777.JavaMail.wassrvr@lts gwas007.sby.ibm.com...
    >I have encountered the following error when using Websphere MQ 5.3 CSD10:
    > MQ encounter MQJMS1016E internal error,please contact your system
    > administrtor.
    > detail message: java.lang.OutOfMemeoryError
    >
    > Does anyone know the reason, how to resolve it?
    > ps: I use the JMS pub/sub mode to listener on MQ topic, but the subscriber
    > side occurs the above error after 24 hours.
    > The received message size is 10k and delivered with ObjectMessage type.
    > Message arrived frequency is about 2-3 per second.
    >




  3. Re: MQJMS1016E java.lang.OutOfMemeoryError

    SaketR,
    Thanks for your reply.
    I have already tried the -Xms and -Xmx options, but it didn't work. I must point out that the only function I used in the onMessage() method is:
    System.out.print(".");
    and I add the -Xloggc:mq.log option, then monitor the gc log file mq.log, find that memory continualy increase, the following is sample output:
    head:
    0.000: [GC 509K->149K(1984K), 0.0050699 secs]
    0.041: [GC 635K->199K(1984K), 0.0019804 secs]
    0.094: [GC 711K->224K(1984K), 0.0017016 secs]
    0.162: [GC 736K->277K(1984K), 0.0019176 secs]
    0.282: [GC 781K->437K(1984K), 0.0027157 secs]
    0.316: [GC 949K->418K(1984K), 0.0014664 secs]
    ...

    tail:
    4488.138: [GC 4902K->4873K(7676K), 0.0002338 secs]
    4488.138: [Full GC 4873K->2640K(7676K), 0.0284226 secs]
    4488.553: [GC 4903K->4874K(7676K), 0.0002330 secs]
    4488.553: [Full GC 4874K->2640K(7676K), 0.0680762 secs]
    4489.238: [GC 4925K->4875K(7676K), 0.0002408 secs]
    4489.238: [Full GC 4875K->2641K(7676K), 0.1407883 secs]
    4490.747: [GC 4905K->4876K(7676K), 0.0002428 secs]
    4490.748: [Full GC 4876K->2641K(7676K), 0.0277482 secs]
    4496.260: [GC 4907K->4877K(7676K), 0.0002335 secs]
    4496.260: [Full GC 4877K->2642K(7676K), 0.1619622 secs]
    4505.956: [GC 4908K->4878K(7676K), 0.0002894 secs]
    4505.956: [Full GC 4878K->2642K(7676K), 0.2570455 secs]

    can someone help me?

    thanks!


  4. Re: MQJMS1016E java.lang.OutOfMemeoryError

    Please see that your heap size is 7-8 MB, which is tiny. Could you repost
    with -Xms128m -Xmx256m, assuming you have > 256 MB of physical memory?

    Also, you are using Sun JVM, have you tried with IBM JVM? (It has different
    default size for the heap).

    Regards,
    Saket



  5. Re: MQJMS1016E java.lang.OutOfMemeoryError

    Saket, follow your instruction, I increase the -Xms and -Xmx value, and the gc log is:

    head:
    0.000: [GC 8118K->520K(130112K), 0.0130743 secs]
    45.067: [GC 8623K->560K(130112K), 0.0034527 secs]
    74.242: [GC 8608K->591K(130112K), 0.0014007 secs]
    97.609: [GC 8634K->616K(130112K), 0.0003690 secs]
    117.727: [GC 8656K->637K(130112K), 0.0003436 secs]
    135.898: [GC 8744K->656K(130112K), 0.0004998 secs]
    152.317: [GC 8754K->673K(130112K), 0.0004087 secs]
    167.526: [GC 8782K->689K(130112K), 0.0022969 secs]
    ...

    tail:
    ...
    26726.768: [Full GC 113157K->28597K(130176K), 0.0876801 secs]
    26727.978: [GC 113232K->113162K(130176K), 0.0012722 secs]
    26727.980: [Full GC 113162K->28598K(130176K), 0.1154923 secs]
    26729.197: [GC 113237K->113167K(130176K), 0.0006917 secs]
    26729.198: [Full GC 113167K->28600K(130176K), 0.0853435 secs]
    26730.413: [GC 113242K->113173K(130176K), 0.0007163 secs]
    26730.414: [Full GC 113173K->28601K(130176K), 0.0579241 secs]
    26731.624: [GC 113248K->113178K(130176K), 0.0008423 secs]
    26731.625: [Full GC 113178K->28602K(130176K), 0.0588195 secs]
    26732.833: [GC 113253K->113183K(130176K), 0.0007462 secs]
    26732.833: [Full GC 113183K->28604K(130176K), 0.0561292 secs]
    26734.047: [GC 113258K->113188K(130176K), 0.0006920 secs]
    26734.048: [Full GC 113188K->28605K(130176K), 0.0567050 secs]

    I must point out that the only function I used is: print("."), but the memory continually increase (form 520K to 28605K). After enough time, the program will occur OutOfMemory error, how to avoid it?

    best regards!
    sqwen


  6. Re: MQJMS1016E java.lang.OutOfMemeoryError

    Sqwen,

    I'll need to see your app code to figure out why one line would cause a
    memory leak. It is likely that there is more in the app that it appears.

    Please could you post minimal testcase with which you can reproduce the
    problem?

    Also, it doesn't appear that you see Out-of-memory with new -Xms and -Xmx
    values?

    Regards,
    Saket

    wrote in message
    news:159008508.1141310109774.JavaMail.wassrvr@ltsg was007.sby.ibm.com...
    > Saket, follow your instruction, I increase the -Xms and -Xmx value, and
    > the gc log is:
    >
    > head:
    > 0.000: [GC 8118K->520K(130112K), 0.0130743 secs]
    > 45.067: [GC 8623K->560K(130112K), 0.0034527 secs]
    > 74.242: [GC 8608K->591K(130112K), 0.0014007 secs]
    > 97.609: [GC 8634K->616K(130112K), 0.0003690 secs]
    > 117.727: [GC 8656K->637K(130112K), 0.0003436 secs]
    > 135.898: [GC 8744K->656K(130112K), 0.0004998 secs]
    > 152.317: [GC 8754K->673K(130112K), 0.0004087 secs]
    > 167.526: [GC 8782K->689K(130112K), 0.0022969 secs]
    > ..
    >
    > tail:
    > ..
    > 26726.768: [Full GC 113157K->28597K(130176K), 0.0876801 secs]
    > 26727.978: [GC 113232K->113162K(130176K), 0.0012722 secs]
    > 26727.980: [Full GC 113162K->28598K(130176K), 0.1154923 secs]
    > 26729.197: [GC 113237K->113167K(130176K), 0.0006917 secs]
    > 26729.198: [Full GC 113167K->28600K(130176K), 0.0853435 secs]
    > 26730.413: [GC 113242K->113173K(130176K), 0.0007163 secs]
    > 26730.414: [Full GC 113173K->28601K(130176K), 0.0579241 secs]
    > 26731.624: [GC 113248K->113178K(130176K), 0.0008423 secs]
    > 26731.625: [Full GC 113178K->28602K(130176K), 0.0588195 secs]
    > 26732.833: [GC 113253K->113183K(130176K), 0.0007462 secs]
    > 26732.833: [Full GC 113183K->28604K(130176K), 0.0561292 secs]
    > 26734.047: [GC 113258K->113188K(130176K), 0.0006920 secs]
    > 26734.048: [Full GC 113188K->28605K(130176K), 0.0567050 secs]
    >
    > I must point out that the only function I used is: print("."), but the
    > memory continually increase (form 520K to 28605K). After enough time, the
    > program will occur OutOfMemory error, how to avoid it?
    >
    > best regards!
    > sqwen
    >




  7. Re: MQJMS1016E java.lang.OutOfMemeoryError

    Saket,

    My program is:

    public class JmsMQSubscriber implements MessageListener {

    public JmsMQSubscriber(TopicConnectionFactory factory, Topic topic) throws JMSException {
    TopicConnection connection = factory.createTopicConnection();
    TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
    TopicSubscriber subscriber = session.createSubscriber(topic);
    subscriber.setMessageListener(this);
    connection.start();
    }

    /* (non-Javadoc)
    * @see javax.jms.MessageListener#onMessage(javax.jms.Mess age)
    */
    public void onMessage(Message arg0) {
    System.out.print(".");
    }

    }

    main class:

    public static void main(String[] args) {
    Hashtable env = JmsMQHelper.getJndiSetting();
    System.out.println("JNDI-Setting=" + env);
    Context initContext = null;
    try {
    initContext = new InitialDirContext(env);
    String tcfName = JmsMQHelper.getTopicConnectionFactoryJndiName();
    System.out.println("TopicConnectionFactory=" + tcfName);
    String topicName = JmsMQHelper.getTopicJndiName();
    System.out.println("Topic=" + topicName);
    TopicConnectionFactory factory =(TopicConnectionFactory) initContext.lookup(tcfName);
    Topic topic = (Topic) initContext.lookup(topicName);
    new JmsMQSubscriber(factory, topic);
    while (! Thread.interrupted() ) {
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) {
    }
    }
    System.out.println("Exit!");
    } catch (NamingException e) {
    e.printStackTrace();
    } catch (JMSException e) {
    System.out.println("JMSException, errorCode=" + e.getErrorCode());
    e.printStackTrace();
    } finally {
    if (initContext != null) {
    try {
    initContext.close();
    } catch (NamingException e) {
    }
    }
    }

    }



    That's all my receiving message program, nothing else, the size of message is about 10k, and the message type is javax.jms.ObjectMessage.


    Following is gc log filter by Full GC:

    cat gc.log | grep Full | head 10
    1077.464: [Full GC 117242K->1743K(122496K), 0.1324029 secs]
    1364.395: [Full GC 117783K->2045K(122560K), 0.1334324 secs]
    1563.117: [Full GC 116686K->2255K(122560K), 0.1408524 secs]
    1727.310: [Full GC 117581K->2301K(122560K), 0.1758724 secs]
    1861.015: [Full GC 117610K->2442K(122560K), 0.1305523 secs]
    1983.790: [Full GC 117336K->2570K(122560K), 0.1393375 secs]
    2082.966: [Full GC 117113K->2674K(122560K), 0.1323816 secs]
    2177.677: [Full GC 117910K->2774K(122560K), 0.1346403 secs]
    2268.693: [Full GC 118087K->2869K(122560K), 0.1368126 secs]
    2355.513: [Full GC 117670K->2960K(122560K), 0.1410148 secs]

    cat mq.log | grep Full | tail -10
    10632.319: [Full GC 112889K->11675K(129856K), 0.1726775 secs]
    10635.983: [Full GC 112928K->11679K(129856K), 0.1658483 secs]
    10639.635: [Full GC 112967K->11682K(129856K), 0.1637106 secs]
    10643.268: [Full GC 113006K->11686K(129856K), 0.1725007 secs]
    10646.923: [Full GC 113045K->11690K(129856K), 0.1661083 secs]
    10650.683: [Full GC 113084K->11694K(129856K), 0.1530433 secs]
    10654.602: [Full GC 113123K->11698K(129856K), 0.1688646 secs]
    10658.255: [Full GC 113162K->11702K(129856K), 0.1583018 secs]
    10661.946: [Full GC 113201K->11706K(129856K), 0.1528535 secs]
    10665.597: [Full GC 113240K->11710K(129856K), 0.1668765 secs]


    The program was been restarted, so the log file is small. I will give you final "tail -10" log after java.lang.OutOfMemoryError.


  8. Re: MQJMS1016E java.lang.OutOfMemeoryError

    Sqwen,

    I'll look into your source in detail, if you can confirm that you can
    reproduce Out-of-memory with:

    -Xms128m -XmxNm

    where N = 1/2 of your physical memory (I'm assuming it's >= 256M).

    Regards,
    Saket

    wrote in message
    news:57935611.1141379013461.JavaMail.wassrvr@ltsgw as007.sby.ibm.com...
    > Saket,
    >
    > My program is:
    >
    > public class JmsMQSubscriber implements MessageListener {
    >
    > public JmsMQSubscriber(TopicConnectionFactory factory, Topic topic) throws
    > JMSException {
    > TopicConnection connection = factory.createTopicConnection();
    > TopicSession session = connection.createTopicSession(false,
    > Session.AUTO_ACKNOWLEDGE);
    > TopicSubscriber subscriber = session.createSubscriber(topic);
    > subscriber.setMessageListener(this);
    > connection.start();
    > }
    >
    > /* (non-Javadoc)
    > * @see javax.jms.MessageListener#onMessage(javax.jms.Mess age)
    > */
    > public void onMessage(Message arg0) {
    > System.out.print(".");
    > }
    >
    > }
    >
    > main class:
    >
    > public static void main(String[] args) {
    > Hashtable env = JmsMQHelper.getJndiSetting();
    > System.out.println("JNDI-Setting=" + env);
    > Context initContext = null;
    > try {
    > initContext = new InitialDirContext(env);
    > String tcfName = JmsMQHelper.getTopicConnectionFactoryJndiName();
    > System.out.println("TopicConnectionFactory=" + tcfName);
    > String topicName = JmsMQHelper.getTopicJndiName();
    > System.out.println("Topic=" + topicName);
    > TopicConnectionFactory factory =(TopicConnectionFactory)
    > initContext.lookup(tcfName);
    > Topic topic = (Topic) initContext.lookup(topicName);
    > new JmsMQSubscriber(factory, topic);
    > while (! Thread.interrupted() ) {
    > try {
    > Thread.sleep(1000);
    > } catch (InterruptedException e) {
    > }
    > }
    > System.out.println("Exit!");
    > } catch (NamingException e) {
    > e.printStackTrace();
    > } catch (JMSException e) {
    > System.out.println("JMSException, errorCode=" + e.getErrorCode());
    > e.printStackTrace();
    > } finally {
    > if (initContext != null) {
    > try {
    > initContext.close();
    > } catch (NamingException e) {
    > }
    > }
    > }
    >
    > }
    >
    >
    >
    > That's all my receiving message program, nothing else, the size of message
    > is about 10k, and the message type is javax.jms.ObjectMessage.
    >
    >
    > Following is gc log filter by Full GC:
    >
    > cat gc.log | grep Full | head 10
    > 1077.464: [Full GC 117242K->1743K(122496K), 0.1324029 secs]
    > 1364.395: [Full GC 117783K->2045K(122560K), 0.1334324 secs]
    > 1563.117: [Full GC 116686K->2255K(122560K), 0.1408524 secs]
    > 1727.310: [Full GC 117581K->2301K(122560K), 0.1758724 secs]
    > 1861.015: [Full GC 117610K->2442K(122560K), 0.1305523 secs]
    > 1983.790: [Full GC 117336K->2570K(122560K), 0.1393375 secs]
    > 2082.966: [Full GC 117113K->2674K(122560K), 0.1323816 secs]
    > 2177.677: [Full GC 117910K->2774K(122560K), 0.1346403 secs]
    > 2268.693: [Full GC 118087K->2869K(122560K), 0.1368126 secs]
    > 2355.513: [Full GC 117670K->2960K(122560K), 0.1410148 secs]
    >
    > cat mq.log | grep Full | tail -10
    > 10632.319: [Full GC 112889K->11675K(129856K), 0.1726775 secs]
    > 10635.983: [Full GC 112928K->11679K(129856K), 0.1658483 secs]
    > 10639.635: [Full GC 112967K->11682K(129856K), 0.1637106 secs]
    > 10643.268: [Full GC 113006K->11686K(129856K), 0.1725007 secs]
    > 10646.923: [Full GC 113045K->11690K(129856K), 0.1661083 secs]
    > 10650.683: [Full GC 113084K->11694K(129856K), 0.1530433 secs]
    > 10654.602: [Full GC 113123K->11698K(129856K), 0.1688646 secs]
    > 10658.255: [Full GC 113162K->11702K(129856K), 0.1583018 secs]
    > 10661.946: [Full GC 113201K->11706K(129856K), 0.1528535 secs]
    > 10665.597: [Full GC 113240K->11710K(129856K), 0.1668765 secs]
    >
    >
    > The program was been restarted, so the log file is small. I will give you
    > final "tail -10" log after java.lang.OutOfMemoryError.
    >




+ Reply to Thread