Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-743

java.lang.OutOfMemoryError: Java heap space when creating 200 connections with AMQP protocol

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JBoss A-MQ 6.2
    • JBoss A-MQ 6.1
    • amqp

      The following test results in

       15:15:51,553 | WARN  | 0.0.1:38971@5672 | Transport                        | 131 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Transport Connection to: tcp://127.0.0.1:38971 failed: java.io.IOException: Unexpected error occured: java.lang.OutOfMemoryError: Java heap space
      

      when the number of created connections reaches 200 for ampq.
      Openwire can handle 1000 connections without errors.

      @Test
      	public void simpleConnectionTest() throws JMSException, InterruptedException {
      		Connection[] connections = new Connection[CON_NUM];
      		for (int i = 0; i < CON_NUM; i++) {
      			connections[i] = conFactory.createConnection();
      			connections[i].start();
      
      		}
      		Thread.sleep(500);
      		for (int i = 0; i < CON_NUM; i++) {
      			connections[i].close();
      		}
      	}
      

              Unassigned Unassigned
              emedvede Elena Medvedeva (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: