Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 15799 invoked from network); 5 Jun 2008 14:21:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jun 2008 14:21:50 -0000 Received: (qmail 75096 invoked by uid 500); 5 Jun 2008 14:21:51 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 75080 invoked by uid 500); 5 Jun 2008 14:21:51 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 75057 invoked by uid 99); 5 Jun 2008 14:21:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 07:21:50 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 14:20:51 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1K4GL3-0003uf-Nt for users@activemq.apache.org; Thu, 05 Jun 2008 07:21:13 -0700 Message-ID: <17670972.post@talk.nabble.com> Date: Thu, 5 Jun 2008 07:21:13 -0700 (PDT) From: Ivan Jovanovic To: users@activemq.apache.org Subject: Re: EOF Exception When Serializing Large Message In-Reply-To: <36e91d9d0806040630i43a9656fidb20f8ef7896bc8@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ivan.jovanovic@gmail.com References: <14671931.post@talk.nabble.com> <17626474.post@talk.nabble.com> <17627420.post@talk.nabble.com> <36e91d9d0806040630i43a9656fidb20f8ef7896bc8@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org HI, I succeeded to put big messages on my broker with your PHP/Stomp client and your test code. I'll look inside my Stomp client a bit deeper to see what happens. Thanks for bringing back hope on the stage ;) Cheers, Ivan Dejan Bosanac wrote: > > Hi, > > I've tried and cannot reproduce this issue. > > here's first a test case trying to send/receive a large message (as Ivan > described in one of previous emails) > > public void testSendLargeMessage() throws Exception { > > MessageConsumer consumer = session.createConsumer(queue); > StringBuffer body = new StringBuffer(); > for (int i = 0; i < 10000000; i++) { > body.append("test"); > } > String frame = "CONNECT\n" + "login: system\n" + "passcode: > manager\n\n" + Stomp.NULL; > stompConnection.sendFrame(frame); > > frame = stompConnection.receiveFrame(); > assertTrue(frame.startsWith("CONNECTED")); > > frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n\n" > + > body.toString() + Stomp.NULL; > > stompConnection.sendFrame(frame); > > TextMessage message = (TextMessage)consumer.receive(10000); > assertNotNull(message); > assertEquals(body.toString(), message.getText()); > > // Make sure that the timestamp is valid - should > // be very close to the current time. > long tnow = System.currentTimeMillis(); > long tmsg = message.getJMSTimestamp(); > assertTrue(Math.abs(tnow - tmsg) < 1000); > } > > and here's a PHP Stomp code trying to do the same > > include 'Stomp.php'; > $i = 0; > $stomp = new Stomp("tcp://localhost:61613"); > $stomp->sync=false; > $stomp->connect(); > > $body = ""; > for ($i = 0; $i < 1000000; $i++) { > $body .= "test"; > } > > $stomp->send("/queue/test", $body); > > $stomp->subscribe("/queue/test"); > $msg = $stomp->readFrame(true); > > if ($msg->body != $body) { > echo "wrong!"; > } > > $stomp->ack($msg); > > $stomp->disconnect(); > ?> > > can anyone send either Java or PHP code that causes this issue? Can you > provide more info about your environment: OS/Java/PHP setup? > > Regards > -- > Dejan Bosanac > www.scriptinginjava.net > > On Tue, Jun 3, 2008 at 6:14 PM, gwittel wrote: > >> >> >> Ivan Jovanovic wrote: >> > >> > I'm experiencing the same problem with the large messages in PHP/Stomp. >> > >> > Did you solve this one, since your problem dates from couple of months >> > ago? >> > >> >> Hi, >> >> We were not able to find a solution other than not to send such large >> messages. We haven't tried 5.1 so I don't know if the problem still >> persists in the current releases. >> >> -Greg >> >> >> gwittel wrote: >> > >> > Hi >> > >> > We're using a Perl/Stomp client to retrieve messages out of a standard >> > queue. When a large message was encountered (~20MB of XML), the client >> > stopped processing data. After more debugging, it looks like the >> server >> > throws an exception when a client hits this message or opens a queue >> with >> > this message at the front of the queue: >> > >> > 2008-01-03 09:23:05,769 [serverip:42663] DEBUG Transport >> > - Transport failed: java.io.EOFException >> > java.io.EOFException >> > at java.io.DataInputStream.readByte(Unknown Source) >> > at >> > >> org.apache.activemq.transport.stomp.StompWireFormat.readLine(StompWireFormat.java:186) >> > at >> > >> org.apache.activemq.transport.stomp.StompWireFormat.unmarshal(StompWireFormat.java:94) >> > at >> > >> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:190) >> > at >> > >> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:182) >> > at >> > >> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:170) >> > at java.lang.Thread.run(Unknown Source) >> > 2008-01-03 09:23:05,769 [serverip:42663] DEBUG TransportConnection >> > - Stopping connection: /serverip:42663 >> > 2008-01-03 09:23:05,770 [serverip:42663] DEBUG TcpTransport >> > - Stopping transport tcp:///serverip:42663 >> > 2008-01-03 09:23:05,770 [serverip:42663] DEBUG TransportConnection >> > - Stopped connection: /serverip:42663 >> > 2008-01-03 09:23:05,770 [serverip:42663] DEBUG TransportConnection >> > - Cleaning up connection resources: /serverip:42663 >> > 2008-01-03 09:23:05,770 [serverip:42663] DEBUG TransportConnection >> > - Connection Stopped: /serverip:42663 >> > >> > We're using AMQ 5.0-RC3 with the AMQ persistent store. Since this >> error >> > was encountered on a production system I have not yet been able to >> upgrade >> > the host to the 5.0-Release. Any thoughts on how we can debug the >> issue, >> > if its a server memory issue (JVM is allowed 1GB at this time), or some >> > other problem. I was able to view the message via the HTTP admin GUI >> > without an exception being thrown. >> > >> > Thanks, >> > -Greg >> > >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/EOF-Exception-When-Serializing-Large-Message-tp14671931s2354p17627420.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > > > > > ----- > Dejan Bosanac > www.scriptinginjava.net > -- View this message in context: http://www.nabble.com/EOF-Exception-When-Serializing-Large-Message-tp14671931s2354p17670972.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.