You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by habumaster <ph...@ericsson.com> on 2011/01/29 00:21:04 UTC

ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Now that I have the Ajax servlet working - stressing it a little and finding
bad message ids popping up.

This is just one - if I send in about 20 I am losing 3-4 of them to this
error.

Looks as if the Ajax response indo on the ID is bad from ActiveMQ 

Any ideas would be helpful :)

Thanks in advance!

http://activemq.2283324.n4.nabble.com/file/n3245621/AMQ_error.jpg 
http://activemq.2283324.n4.nabble.com/file/n3245621/AMQ_error.jpg 

-- 
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-Ajax-interface-losing-message-ids-under-stress-tp3245621p3245621.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by habumaster <ph...@ericsson.com>.

Alex Dean-2 wrote:
> 
> 
> So you have a single browser window, and for some reason it is creating
> multiple ajax poll requests which are running concurrently?
> 
> It would be helpful to see:
>  * Your JS code.
>  * The HTTP headers & content from your code's initial connection to the
> broker (from init()), and any POSTs from addListener()
> 
> Does running ActiveMQ with debug logging enabled give you any clues?
> 
> alex
> 

Well, turns out it is CDATA to the rescue again :) Once I bracketed one of
the stomp client's messages with <![CDATA[.........]]>, it does not occur
anymore.

Still seeing the NULL message ID as explained before, but with this snapshot
the very next response has the ID with the contents duplicated, so you see
no problem if not running FireBug.

Is this something I can provide data to you on?

Phil

-- 
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-Ajax-interface-losing-message-ids-under-stress-tp3245621p3311424.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by Alex Dean <al...@crackpot.org>.
On Feb 15, 2011, at 9:34 PM, habumaster wrote:

> 
> Looking for debug ideas on this - I am happy to capture any data to help?

So you have a single browser window, and for some reason it is creating multiple ajax poll requests which are running concurrently?

It would be helpful to see:
 * Your JS code.
 * The HTTP headers & content from your code's initial connection to the broker (from init()), and any POSTs from addListener()

Does running ActiveMQ with debug logging enabled give you any clues?

alex

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by habumaster <ph...@ericsson.com>.
Looking for debug ideas on this - I am happy to capture any data to help?
Trying to make a choice reals soon on going this route or investigating
another alternative. Please help 

Phil
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-Ajax-interface-losing-message-ids-under-stress-tp3245621p3308145.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by habumaster <ph...@ericsson.com>.
Looking for debug ideas on this? Having to make a choice real soon if we will
have to go another route with the application or not .

Phil
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-Ajax-interface-losing-message-ids-under-stress-tp3245621p3308147.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by habumaster <ph...@ericsson.com>.
It's a single browser window, no tabs.

There are application windows open inside the browser window (telnet, chat),
but they are all using the
single AMQ connection established when application was started.

Phil  
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-Ajax-interface-losing-message-ids-under-stress-tp3245621p3297845.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by Alex Dean <al...@crackpot.org>.
On Feb 8, 2011, at 4:13 PM, habumaster wrote:

> 
> Also seeing Gets receiving responses but continuing to spin, even though
> another Get is spawned.
> They start piling up and browser gets busy with all the Gets....... 

So your browser has multiple polls (GETs) underway at the same time?  Are all the polls from a single browser window, or do you have multiple windows open?

alex

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by habumaster <ph...@ericsson.com>.
Also seeing Gets receiving responses but continuing to spin, even though
another Get is spawned.
They start piling up and browser gets busy with all the Gets....... 
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-Ajax-interface-losing-message-ids-under-stress-tp3245621p3276846.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by habumaster <ph...@ericsson.com>.
I am using the Nightly build apache-activemq-5.5-20111029.041638-14-bin

I still see the null IDs, but almost immediately, another response comes in
that is a duplicate of the previous one, but the new one has a valid id.
So......message is not lost, but strange how I get a null and then a valid
right after it.
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-Ajax-interface-losing-message-ids-under-stress-tp3245621p3265258.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by habumaster <ph...@ericsson.com>.
>I have sometimes seen this error, but I'm not sure what causes it.  I only
see it occasionally while testing >other features and I haven't been able to
reproduce it reliably.  If you are able to, could you explain how >in more
detail? 
>There's another issue in 5.4.2 which can cause an ajax client to not
receive all messages intended for it. 
>https://issues.apache.org/jira/browse/AMQ-3094

>I recently checked in a fix for this issue, so could you try your tests
with a nightly snapshot build and see >if that helps at all? 
>https://repository.apache.org/content/repositories/snapshots/org/apache/activemq/apache-activemq/5.5->SNAPSHOT/

alex 


I will try that build tomorrow and let you know.

The how we do it: a ruby script run in a unix term 

require 'rubygems'
require 'stomp'

for x in 1..20

sc = Stomp::Client.new("", "",  "47.105.91.75", "61613", false)

data = "<![CDATA[Element.insert(\"chat_message_list_70\", { bottom:
\"<li>Dave_#{x}<\li>\"})]]>"

puts "#{data.inspect}"
puts "#{data}.End of data"

sc.publish("/topic/CHANNEL_16", data, {"amq-msg-type"=>"text"} )
	     
sc.close

end

This has the numbering inserted as well (Dave_1, Dave_2, etc)
I also saw the messages return in the wrong order :(

Phil
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-Ajax-interface-losing-message-ids-under-stress-tp3245621p3247803.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.4.2 Ajax interface losing message ids under stress

Posted by Alex Dean <al...@crackpot.org>.
On Jan 28, 2011, at 5:21 PM, habumaster wrote:

> 
> Now that I have the Ajax servlet working - stressing it a little and finding
> bad message ids popping up.
> 
> This is just one - if I send in about 20 I am losing 3-4 of them to this
> error.
> 
> Looks as if the Ajax response indo on the ID is bad from ActiveMQ 
> 
> Any ideas would be helpful :)
> 
> Thanks in advance!
> 
> http://activemq.2283324.n4.nabble.com/file/n3245621/AMQ_error.jpg 
> http://activemq.2283324.n4.nabble.com/file/n3245621/AMQ_error.jpg 

I have sometimes seen this error, but I'm not sure what causes it.  I only see it occasionally while testing other features and I haven't been able to reproduce it reliably.  If you are able to, could you explain how in more detail?

There's another issue in 5.4.2 which can cause an ajax client to not receive all messages intended for it.
https://issues.apache.org/jira/browse/AMQ-3094

I recently checked in a fix for this issue, so could you try your tests with a nightly snapshot build and see if that helps at all?
https://repository.apache.org/content/repositories/snapshots/org/apache/activemq/apache-activemq/5.5-SNAPSHOT/

alex