activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cronos <>
Subject Socket Woes
Date Fri, 03 Aug 2007 19:41:09 GMT


I am currently load testing activemq using 1 queue & a variant of the
test.php(stomp) client. I have
probably run up 30 iterations of the test, changing various values in the
xml configuration file, each
time, the thread > ActiveMQ Transport: tcp:/// dies within a
DispatchCount and
DequeueCount range of 15,000-15,700. Watching the tcp connections, using
netstat, i can see the
socket going into TIME_WAIT and eventually disconnecting. There are no


Activemq 4.1.1 (binary)
Stomp php
J2SE 5.0 update 8
Cent OS 4 - version 20060930 

Typical Queue Stats at socket disconnection

ConsumerCount > 1
DequeueCount > 15193
DispatchCount > 15194
EnqueueCount > 15194
MemoryPercentageUsed > 0
QueueSize > 1

Broker Stats at socket disconnection

Committed Memory > 65MB
Used > 9MB
Peck Threads > 31
Life Threads > 29

Test Client

include_once ("Stomp.php");

$c = new StompConnection("localhost","51516");
$c->subscribe("/queue/FOO", array("activemq.prefetchSize"=>"1"));

While(true) {

$c->send("/queue/FOO", "Hello World!");
// Wait for the message to come in..
$result = $c->readFrame();



Configuration File
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:amq="">


        <amq:broker brokerName="activemq" useJmx="true"
advisorySupport="false" persistent="false">
                                        <amq:policyEntry queue=">">
<amq:individualDeadLetterStrategy queuePrefix="DLQ."
useQueueForQueueMessages="true" />

                        <amq:managementContext rmiServerPort="8100" />

                        <amq:usageManager limit="120 MB" />






One obvious fact is that the broker dispatches a message (number 15194) to
the client 
before the disconnection. The client doesn't ack the message, hence the 1
message stuck in 
the queue. The question is what is causing the disconnection? Is there
anything we can do
to maintain the connection?

I have tried to specify socket behaviour via the configuration file as


<uri>tcp://localhost:61616?socketBufferSize=65536 </uri>

uri>tcp://localhost:61616?tcpNoDelayEnabled=false </uri>

and nothing has worked so far. Also the usagemanager has 120 MB of memory.
Has anybody encountered
this problem before? Any insights appreciated.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message