You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mrloud <je...@gmail.com> on 2012/11/28 18:02:50 UTC

Large message failure over http transport

Extracted from IRC chat with cposta:

I'm getting "IOException: Could not post command" using the http transport
on AMQ 5.7.  Any tips on what I should be looking at to fix this?  This is
going to be a low volume, but possibly large message size, server.

I'm sending in a TextMessage with text set to a string created from an empty
byte array, just so I can experiment with sizes.
10mb fails, 5mb completes ususally, just ran a 6mb and it completed, 7mb
failed with same error
We are going to be pretty low volume, maybe 500-600 messages a day, but the
payloads can be larger
heap size is 1024mb

Client Trace:

javax.jms.JMSException: Could not post command: ActiveMQTextMessage
{commandId = 5, responseRequired = false, messageId =
ID:tsg3038-50643-1354119150216-1:1:1:1:1, originalDestination = null,
originalTransactionId = null, producerId =
ID:tsg3038-50643-1354119150216-1:1:1:1, destination = queue://FOO.BAR,
transactionId = null, expiration = 0, timestamp = 1354119150836, arrival =
0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo =
null, persistent = true, type = null, priority = 4, groupID = null,
groupSequence = 0, targetConsumerId = null, compressed = false, userID =
null, content = null, marshalledProperties = null, dataStructure = null,
redeliveryCounter = 0, size = 0, properties = {dealerAccount=123456,
QuoteTypeID=2, PONumber=0, RequestFrom=FromSendToWorkflow, QuoteID=7312264},
readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
...
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
	at
org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1245)
	at
org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1237)
	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1738)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231)
	at
org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
	at mqtest.MQTest.publish(MQTest.java:167)
	at mqtest.HttpLoadTest$TestThread.run(HttpLoadTest.java:101)
Caused by: java.io.IOException: Could not post command: ActiveMQTextMessage
{commandId = 5, responseRequired = false, messageId =
ID:tsg3038-50643-1354119150216-1:1:1:1:1, originalDestination = null,
originalTransactionId = null, producerId =
ID:tsg3038-50643-1354119150216-1:1:1:1, destination = queue://FOO.BAR,
transactionId = null, expiration = 0, timestamp = 1354119150836, arrival =
0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo =
null, persistent = true, type = null, priority = 4, groupID = null,
groupSequence = 0, targetConsumerId = null, compressed = false, userID =
null, content = null, marshalledProperties = null, dataStructure = null,
redeliveryCounter = 0, size = 0, properties = {dealerAccount=123456,
QuoteTypeID=2, PONumber=0, RequestFrom=FromSendToWorkflow, QuoteID=7312264},
readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
...
	at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
	at
org.apache.activemq.transport.http.HttpClientTransport.oneway(HttpClientTransport.java:101)
	at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
	at
org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
	at
org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1243)
	... 6 more
Caused by: java.io.IOException: Could not post command: ActiveMQTextMessage
{commandId = 5, responseRequired = false, messageId =
ID:tsg3038-50643-1354119150216-1:1:1:1:1, originalDestination = null,
originalTransactionId = null, producerId =
ID:tsg3038-50643-1354119150216-1:1:1:1, destination = queue://FOO.BAR,
transactionId = null, expiration = 0, timestamp = 1354119150836, arrival =
0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo =
null, persistent = true, type = null, priority = 4, groupID = null,
groupSequence = 0, targetConsumerId = null, compressed = false, userID =
null, content = null, marshalledProperties = null, dataStructure = null,
redeliveryCounter = 0, size = 0, properties = {dealerAccount=123456,
QuoteTypeID=2, PONumber=0, RequestFrom=FromSendToWorkflow, QuoteID=7312264},
readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
...
	at
org.apache.activemq.transport.http.HttpClientTransport.oneway(HttpClientTransport.java:91)
	... 9 more

Server Trace:

2012-11-28 10:12:45,266 | ERROR | / | org.mortbay.log | btpool1-3
com.thoughtworks.xstream.converters.ConversionException:  : error reading
input, returned 0 :  : error reading input, returned 0
---- Debugging information ----
message             :  : error reading input, returned 0
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : error reading input, returned 0
class               : org.apache.activemq.command.ActiveMQTextMessage
required-type       : java.lang.String
path                : /org.apache.activemq.command.ActiveMQTextMessage/text
line number         : 54
-------------------------------
	at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
	at
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
	at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
	at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
	at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
	at
com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
	at
com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
	at
org.apache.activemq.transport.xstream.XStreamWireFormat.unmarshalText(XStreamWireFormat.java:55)
	at
org.apache.activemq.transport.http.HttpTunnelServlet.doPost(HttpTunnelServlet.java:102)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:324)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
	at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
	at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
	at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: com.thoughtworks.xstream.io.StreamException:  : error reading
input, returned 0
	at
com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:80)
	at
com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:137)
	at
com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:124)
	at
com.thoughtworks.xstream.io.xml.AbstractPullReader.getValue(AbstractPullReader.java:167)
	at
com.thoughtworks.xstream.io.ReaderWrapper.getValue(ReaderWrapper.java:48)
	at
com.thoughtworks.xstream.converters.SingleValueConverterWrapper.unmarshal(SingleValueConverterWrapper.java:49)
	at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	... 31 more
Caused by: java.io.IOException: error reading input, returned 0
	at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2991)
	at org.xmlpull.mxp1.MXParser.more(MXParser.java:2996)
	at org.xmlpull.mxp1.MXParser.parseEntityRef(MXParser.java:2151)
	at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1274)
	at org.xmlpull.mxp1.MXParser.next(MXParser.java:1092)
	at
com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:63)
	... 37 more




--
View this message in context: http://activemq.2283324.n4.nabble.com/Large-message-failure-over-http-transport-tp4659891.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Large message failure over http transport

Posted by mrloud <je...@gmail.com>.
Ok, seems I was mistaken that this was happening under 5.7, I must have been
hitting our 5.3.2 server.  Sorry for the false alarm guys!



--
View this message in context: http://activemq.2283324.n4.nabble.com/Large-message-failure-over-http-transport-tp4659891p4660006.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Large message failure over http transport

Posted by mrloud <je...@gmail.com>.
I'm stuck on http because of firewall/proxy issues that I have no control
over :(

broker config:

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.apache.org/schema/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">

    <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <value>file:${activemq.base}/conf/credentials.properties</value>
        </property>      
    </bean>

    <broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" dataDirectory="${activemq.base}/data">
		<destinationInterceptors>
			<mirroredQueue copyMessage="true" postfix=".qmirror" prefix=""/>
			<virtualDestinationInterceptor>
				<virtualDestinations>
				  <compositeQueue name="Quote.quoteData" forwardOnly="false">
					<forwardTo>
					  <filteredDestination selector="QuoteTypeID = 6 AND RequestFrom =
'FromSubmitToGNS'" queue="Quote.gnsNatData"/>
					  <filteredDestination selector="QuoteTypeID = 7 AND RequestFrom =
'FromSubmitToGNS'" queue="Quote.gnsGovData"/>
					</forwardTo>
				  </compositeQueue>
				</virtualDestinations>
			</virtualDestinationInterceptor>
		</destinationInterceptors>
        
        <destinationPolicy>
            <policyMap>
              <policyEntries>
                <policyEntry topic=">" producerFlowControl="false"
memoryLimit="10mb">
                  <pendingSubscriberPolicy>
                    <vmCursor />
                  </pendingSubscriberPolicy>
                </policyEntry>
                <policyEntry queue=">" producerFlowControl="false"
queuePrefetch="1">
                  <pendingQueuePolicy>
                    <fileQueueCursor/>
                  </pendingQueuePolicy>
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy> 

        <managementContext>
            <managementContext createConnector="true"/>
        </managementContext>

        <persistenceAdapter>
            <kahaDB directory="${activemq.base}/data/kahadb"/>
        </persistenceAdapter>
        
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="256 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="10 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="10 gb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>
		  
        <transportConnectors>
			
            <transportConnector name="httpConn" uri="http://0.0.0.0:80"/>
			<transportConnector name="httpConnTest" uri="http://0.0.0.0:8081"/>
            <transportConnector name="tcpConn" uri="tcp://0.0.0.0:61616"/>
        </transportConnectors>

    </broker>

    <import resource="jetty.xml"/>
</beans>




--
View this message in context: http://activemq.2283324.n4.nabble.com/Large-message-failure-over-http-transport-tp4659891p4660003.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Large message failure over http transport

Posted by Christian Posta <ch...@gmail.com>.
Also, can you explain a little more about your usecase? HTTP might not be
the best option for these larger payloads.

What happens under the covers is the ActiveMQTextMessage object is
converted to XML using xstream. There is some tuning around compressing the
final XML before it goes out over the wire, but even so when it gets to the
broker, the broker will have to uncompress it and convert back from XML to
an ActiveMQTextMessage which it can then handle. The
marshalling/unmarhsalling combined with the XML tags will turn large
messages (10MB) into much larger messages (80MB). HTTP transport is great
for some usecases, but for this one maybe not?? dunno... maybe the problem
you're trying to solve can be better solved a different way...


On Thu, Nov 29, 2012 at 4:17 PM, Christian Posta
<ch...@gmail.com>wrote:

> Can you post your broker config?
>
> I have been trying 10MB payloads and they work fine. In IRC i mentioned I
> was getting OOM, but my test case was trying to send 100MB payloads, not
> 10MB.
>
> Also,
> is your exception stack trace from the client side? Or broker side?
>
>
> On Wed, Nov 28, 2012 at 10:02 AM, mrloud <je...@gmail.com> wrote:
>
>> Extracted from IRC chat with cposta:
>>
>> I'm getting "IOException: Could not post command" using the http transport
>> on AMQ 5.7.  Any tips on what I should be looking at to fix this?  This is
>> going to be a low volume, but possibly large message size, server.
>>
>> I'm sending in a TextMessage with text set to a string created from an
>> empty
>> byte array, just so I can experiment with sizes.
>> 10mb fails, 5mb completes ususally, just ran a 6mb and it completed, 7mb
>> failed with same error
>> We are going to be pretty low volume, maybe 500-600 messages a day, but
>> the
>> payloads can be larger
>> heap size is 1024mb
>>
>> Client Trace:
>>
>> javax.jms.JMSException: Could not post command: ActiveMQTextMessage
>> {commandId = 5, responseRequired = false, messageId =
>> ID:tsg3038-50643-1354119150216-1:1:1:1:1, originalDestination = null,
>> originalTransactionId = null, producerId =
>> ID:tsg3038-50643-1354119150216-1:1:1:1, destination = queue://FOO.BAR,
>> transactionId = null, expiration = 0, timestamp = 1354119150836, arrival =
>> 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo =
>> null, persistent = true, type = null, priority = 4, groupID = null,
>> groupSequence = 0, targetConsumerId = null, compressed = false, userID =
>> null, content = null, marshalledProperties = null, dataStructure = null,
>> redeliveryCounter = 0, size = 0, properties = {dealerAccount=123456,
>> QuoteTypeID=2, PONumber=0, RequestFrom=FromSendToWorkflow,
>> QuoteID=7312264},
>> readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
>> ...
>>         at
>>
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
>>         at
>>
>> org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1245)
>>         at
>>
>> org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1237)
>>         at
>> org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1738)
>>         at
>>
>> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231)
>>         at
>>
>> org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
>>         at mqtest.MQTest.publish(MQTest.java:167)
>>         at mqtest.HttpLoadTest$TestThread.run(HttpLoadTest.java:101)
>> Caused by: java.io.IOException: Could not post command:
>> ActiveMQTextMessage
>> {commandId = 5, responseRequired = false, messageId =
>> ID:tsg3038-50643-1354119150216-1:1:1:1:1, originalDestination = null,
>> originalTransactionId = null, producerId =
>> ID:tsg3038-50643-1354119150216-1:1:1:1, destination = queue://FOO.BAR,
>> transactionId = null, expiration = 0, timestamp = 1354119150836, arrival =
>> 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo =
>> null, persistent = true, type = null, priority = 4, groupID = null,
>> groupSequence = 0, targetConsumerId = null, compressed = false, userID =
>> null, content = null, marshalledProperties = null, dataStructure = null,
>> redeliveryCounter = 0, size = 0, properties = {dealerAccount=123456,
>> QuoteTypeID=2, PONumber=0, RequestFrom=FromSendToWorkflow,
>> QuoteID=7312264},
>> readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
>> ...
>>         at
>>
>> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
>>         at
>>
>> org.apache.activemq.transport.http.HttpClientTransport.oneway(HttpClientTransport.java:101)
>>         at
>>
>> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
>>         at
>>
>> org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
>>         at
>>
>> org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1243)
>>         ... 6 more
>> Caused by: java.io.IOException: Could not post command:
>> ActiveMQTextMessage
>> {commandId = 5, responseRequired = false, messageId =
>> ID:tsg3038-50643-1354119150216-1:1:1:1:1, originalDestination = null,
>> originalTransactionId = null, producerId =
>> ID:tsg3038-50643-1354119150216-1:1:1:1, destination = queue://FOO.BAR,
>> transactionId = null, expiration = 0, timestamp = 1354119150836, arrival =
>> 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo =
>> null, persistent = true, type = null, priority = 4, groupID = null,
>> groupSequence = 0, targetConsumerId = null, compressed = false, userID =
>> null, content = null, marshalledProperties = null, dataStructure = null,
>> redeliveryCounter = 0, size = 0, properties = {dealerAccount=123456,
>> QuoteTypeID=2, PONumber=0, RequestFrom=FromSendToWorkflow,
>> QuoteID=7312264},
>> readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
>> ...
>>         at
>>
>> org.apache.activemq.transport.http.HttpClientTransport.oneway(HttpClientTransport.java:91)
>>         ... 9 more
>>
>> Server Trace:
>>
>> 2012-11-28 10:12:45,266 | ERROR | / | org.mortbay.log | btpool1-3
>> com.thoughtworks.xstream.converters.ConversionException:  : error reading
>> input, returned 0 :  : error reading input, returned 0
>> ---- Debugging information ----
>> message             :  : error reading input, returned 0
>> cause-exception     : com.thoughtworks.xstream.io.StreamException
>> cause-message       :  : error reading input, returned 0
>> class               : org.apache.activemq.command.ActiveMQTextMessage
>> required-type       : java.lang.String
>> path                :
>> /org.apache.activemq.command.ActiveMQTextMessage/text
>> line number         : 54
>> -------------------------------
>>         at
>>
>> com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
>>         at
>>
>> com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
>>         at
>>
>> com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
>>         at
>>
>> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
>>         at
>>
>> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
>>         at
>>
>> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
>>         at
>>
>> com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
>>         at
>>
>> com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
>>         at
>>
>> com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
>>         at
>>
>> com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
>>         at
>>
>> com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
>>         at
>>
>> com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
>>         at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
>>         at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
>>         at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
>>         at
>>
>> org.apache.activemq.transport.xstream.XStreamWireFormat.unmarshalText(XStreamWireFormat.java:55)
>>         at
>>
>> org.apache.activemq.transport.http.HttpTunnelServlet.doPost(HttpTunnelServlet.java:102)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>>         at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>         at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>         at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>>         at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>         at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>         at
>>
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
>>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
>>         at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
>>         at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>         at
>>
>> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>>         at
>>
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>> Caused by: com.thoughtworks.xstream.io.StreamException:  : error reading
>> input, returned 0
>>         at
>> com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:80)
>>         at
>>
>> com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:137)
>>         at
>>
>> com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:124)
>>         at
>>
>> com.thoughtworks.xstream.io.xml.AbstractPullReader.getValue(AbstractPullReader.java:167)
>>         at
>> com.thoughtworks.xstream.io.ReaderWrapper.getValue(ReaderWrapper.java:48)
>>         at
>>
>> com.thoughtworks.xstream.converters.SingleValueConverterWrapper.unmarshal(SingleValueConverterWrapper.java:49)
>>         at
>>
>> com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
>>         ... 31 more
>> Caused by: java.io.IOException: error reading input, returned 0
>>         at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2991)
>>         at org.xmlpull.mxp1.MXParser.more(MXParser.java:2996)
>>         at org.xmlpull.mxp1.MXParser.parseEntityRef(MXParser.java:2151)
>>         at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1274)
>>         at org.xmlpull.mxp1.MXParser.next(MXParser.java:1092)
>>         at
>> com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:63)
>>         ... 37 more
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/Large-message-failure-over-http-transport-tp4659891.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta
>
>


-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: Large message failure over http transport

Posted by Christian Posta <ch...@gmail.com>.
Can you post your broker config?

I have been trying 10MB payloads and they work fine. In IRC i mentioned I
was getting OOM, but my test case was trying to send 100MB payloads, not
10MB.

Also,
is your exception stack trace from the client side? Or broker side?


On Wed, Nov 28, 2012 at 10:02 AM, mrloud <je...@gmail.com> wrote:

> Extracted from IRC chat with cposta:
>
> I'm getting "IOException: Could not post command" using the http transport
> on AMQ 5.7.  Any tips on what I should be looking at to fix this?  This is
> going to be a low volume, but possibly large message size, server.
>
> I'm sending in a TextMessage with text set to a string created from an
> empty
> byte array, just so I can experiment with sizes.
> 10mb fails, 5mb completes ususally, just ran a 6mb and it completed, 7mb
> failed with same error
> We are going to be pretty low volume, maybe 500-600 messages a day, but the
> payloads can be larger
> heap size is 1024mb
>
> Client Trace:
>
> javax.jms.JMSException: Could not post command: ActiveMQTextMessage
> {commandId = 5, responseRequired = false, messageId =
> ID:tsg3038-50643-1354119150216-1:1:1:1:1, originalDestination = null,
> originalTransactionId = null, producerId =
> ID:tsg3038-50643-1354119150216-1:1:1:1, destination = queue://FOO.BAR,
> transactionId = null, expiration = 0, timestamp = 1354119150836, arrival =
> 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo =
> null, persistent = true, type = null, priority = 4, groupID = null,
> groupSequence = 0, targetConsumerId = null, compressed = false, userID =
> null, content = null, marshalledProperties = null, dataStructure = null,
> redeliveryCounter = 0, size = 0, properties = {dealerAccount=123456,
> QuoteTypeID=2, PONumber=0, RequestFrom=FromSendToWorkflow,
> QuoteID=7312264},
> readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
> ...
>         at
>
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
>         at
>
> org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1245)
>         at
>
> org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1237)
>         at
> org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1738)
>         at
>
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231)
>         at
>
> org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
>         at mqtest.MQTest.publish(MQTest.java:167)
>         at mqtest.HttpLoadTest$TestThread.run(HttpLoadTest.java:101)
> Caused by: java.io.IOException: Could not post command: ActiveMQTextMessage
> {commandId = 5, responseRequired = false, messageId =
> ID:tsg3038-50643-1354119150216-1:1:1:1:1, originalDestination = null,
> originalTransactionId = null, producerId =
> ID:tsg3038-50643-1354119150216-1:1:1:1, destination = queue://FOO.BAR,
> transactionId = null, expiration = 0, timestamp = 1354119150836, arrival =
> 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo =
> null, persistent = true, type = null, priority = 4, groupID = null,
> groupSequence = 0, targetConsumerId = null, compressed = false, userID =
> null, content = null, marshalledProperties = null, dataStructure = null,
> redeliveryCounter = 0, size = 0, properties = {dealerAccount=123456,
> QuoteTypeID=2, PONumber=0, RequestFrom=FromSendToWorkflow,
> QuoteID=7312264},
> readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
> ...
>         at
>
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
>         at
>
> org.apache.activemq.transport.http.HttpClientTransport.oneway(HttpClientTransport.java:101)
>         at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
>         at
>
> org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
>         at
>
> org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1243)
>         ... 6 more
> Caused by: java.io.IOException: Could not post command: ActiveMQTextMessage
> {commandId = 5, responseRequired = false, messageId =
> ID:tsg3038-50643-1354119150216-1:1:1:1:1, originalDestination = null,
> originalTransactionId = null, producerId =
> ID:tsg3038-50643-1354119150216-1:1:1:1, destination = queue://FOO.BAR,
> transactionId = null, expiration = 0, timestamp = 1354119150836, arrival =
> 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo =
> null, persistent = true, type = null, priority = 4, groupID = null,
> groupSequence = 0, targetConsumerId = null, compressed = false, userID =
> null, content = null, marshalledProperties = null, dataStructure = null,
> redeliveryCounter = 0, size = 0, properties = {dealerAccount=123456,
> QuoteTypeID=2, PONumber=0, RequestFrom=FromSendToWorkflow,
> QuoteID=7312264},
> readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
> ...
>         at
>
> org.apache.activemq.transport.http.HttpClientTransport.oneway(HttpClientTransport.java:91)
>         ... 9 more
>
> Server Trace:
>
> 2012-11-28 10:12:45,266 | ERROR | / | org.mortbay.log | btpool1-3
> com.thoughtworks.xstream.converters.ConversionException:  : error reading
> input, returned 0 :  : error reading input, returned 0
> ---- Debugging information ----
> message             :  : error reading input, returned 0
> cause-exception     : com.thoughtworks.xstream.io.StreamException
> cause-message       :  : error reading input, returned 0
> class               : org.apache.activemq.command.ActiveMQTextMessage
> required-type       : java.lang.String
> path                : /org.apache.activemq.command.ActiveMQTextMessage/text
> line number         : 54
> -------------------------------
>         at
>
> com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
>         at
>
> com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
>         at
>
> com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
>         at
>
> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
>         at
>
> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
>         at
>
> com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
>         at
>
> com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
>         at
>
> com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
>         at
>
> com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
>         at
>
> com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
>         at
>
> com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
>         at
>
> com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
>         at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
>         at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
>         at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
>         at
>
> org.apache.activemq.transport.xstream.XStreamWireFormat.unmarshalText(XStreamWireFormat.java:55)
>         at
>
> org.apache.activemq.transport.http.HttpTunnelServlet.doPost(HttpTunnelServlet.java:102)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:324)
>         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>         at
>
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>         at
>
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>         at
>
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Caused by: com.thoughtworks.xstream.io.StreamException:  : error reading
> input, returned 0
>         at
> com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:80)
>         at
>
> com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:137)
>         at
>
> com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:124)
>         at
>
> com.thoughtworks.xstream.io.xml.AbstractPullReader.getValue(AbstractPullReader.java:167)
>         at
> com.thoughtworks.xstream.io.ReaderWrapper.getValue(ReaderWrapper.java:48)
>         at
>
> com.thoughtworks.xstream.converters.SingleValueConverterWrapper.unmarshal(SingleValueConverterWrapper.java:49)
>         at
>
> com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
>         ... 31 more
> Caused by: java.io.IOException: error reading input, returned 0
>         at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2991)
>         at org.xmlpull.mxp1.MXParser.more(MXParser.java:2996)
>         at org.xmlpull.mxp1.MXParser.parseEntityRef(MXParser.java:2151)
>         at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1274)
>         at org.xmlpull.mxp1.MXParser.next(MXParser.java:1092)
>         at
> com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:63)
>         ... 37 more
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Large-message-failure-over-http-transport-tp4659891.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta