[ 
https://issues.apache.org/jira/browse/ARTEMIS-1036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic closed ARTEMIS-1036.
------------------------------------

> Streaming huge messages between cluster nodes causes 
> java.lang.OutOfMemoryError: Direct buffer memory
> -----------------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1036
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1036
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.5.4, 2.0.0
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>
> _Scenario_
> * 2 servers are started in cluster.
> * Send one 1GB message to node1. Message is sent as described in subchapter 
> [Streaming over JMS in Artemis docs | 
> https://activemq.apache.org/artemis/docs/1.0.0/large-messages.html], it is 
> sent like stream from file : 
> {code}
> BytesMessage message = session.createBytesMessage();
> message.setObjectProperty("JMS_AMQ_InputStream", bufferedInput);
> producer.send(message);
> {code}
> * Connect consumer on node2 and wait for message to redistribute to node2.
> * Receive 1GB stream message from node2 as described in subchapter [Streaming 
> over JMS in Artemis docs | 
> https://activemq.apache.org/artemis/docs/1.0.0/large-messages.html], it is 
> saved to file. 
> {code}
>  BytesMessage messageReceived = (BytesMessage) consumer.receive(timeout);
> // This will block until the entire content is saved on disk
> messageReceived.setObjectProperty("JMS_AMQ_SaveStream", bufferedOutput);
> {code}
> _What is wrong_
> During message redistribution from node1 to node2 following error appears. It 
> is thrown on node1.
> {code:title=OOM on node1 during message redistribution}
> 17:52:31,171 WARN  [org.apache.activemq.artemis.utils.OrderedExecutorFactory] 
> (Thread-23 
> (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$3@58d509f4-431458715))
>  failed to allocate 16777216 byte(s) of direct memory (used: 721420295, max: 
> 734527488): io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 
> 16777216 byte(s) of direct memory (used: 721420295, max: 734527488)
>       at ...
> {code}
> _Notes_
> * This scenario only with one server (no cluster, just send/receive on one 
> node) passes OK.
> * Message size is larger than server JVM memory. Artemis docs says following 
> : "The only realistic limit to the size of a message that can be sent or 
> consumed is the amount of disk space you have available".



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to