You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rob Springer <rs...@etinternational.com> on 2009/12/22 23:50:54 UTC

BDB Message store - rationale?

Hey all - we have run up against the max open files aspect of using the 
message store plugin, and would rather not require our users edit 
limits.conf to be able to run our software (and the fact that we'd just 
be racing against the scaling up of the number of declared queues is 
scary), so we were considering potential alternative solutions.

The first question that came up was regarding the message store plugin's 
use of journal files - why is such a large number (8) the default?  Why 
are the queues created per-queue, as opposed to a coarser-grained 
implementation, etc?

Google and mailing list searches didn't reveal a ton of rationale / 
design discussions, so we figured we'd ask directly...

Finally, if this isn't the mailing list to ask this on (is there a Red 
Hat one for the message store?), could y'all direct me there?

Thanks a ton!
-Rob

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: RESOURCE_LIMIT_EXCEEDED exception - any advice?

Posted by Rajith Attapattu <ra...@gmail.com>.
Hi Slava,


On Thu, Dec 24, 2009 at 11:43 AM,  <sk...@segcap.com> wrote:
> Hi,
> actually I do have subscribers, and also I specify queue policy as "ring"

> -----------------------------------
> Map <String, Object> argument = new HashMap<String, Object>();
>                argument.put("qpid.policy_type", "ring");
>                argument.put("qpid.max_count", -1);
>
>            session.queueDeclare(queueName, null, argument, Option.EXCLUSIVE, Option.AUTO_DELETE);
>            session.exchangeBind(queueName, "amq.topic", bindingKey, null);
>
> ---------------------------------

Well are you sure your subscribers are fast enough?
Also it would be good to verify if the queue has the right policy as well.
You could verify the details by using qpid-tool.
qpid-tool is python based management tool.

Look at the section called qpid-tool in the following location
http://qpid.apache.org/mgmtc.html

You can use that to look at a queue and see the policy (in the
arguments section), current queue depth (in bytes and messages), the
number of enqueues, dequeues and subscribers it has.
qpid-tool should give you a clear idea as to whats going on with the queue.

>
> I added default-queue-limit=0
> to qpidd.conf,  hope that would help in the interim. But the problem still persists.
If default-queue-limit is set to zero, then it will be treated as unlimited.
But since you are still getting the exception I am wondering if your
the broker is using your config file.

> Btw, anybody have an estimate when M5 is coming out?
0.5 is already out.
The 0.6 release is expected to go through during the first 2 weeks of Jan.

> Regards,
> Slava
>
>
>
> -----Original Message-----
> From: "Rajith Attapattu" <ra...@gmail.com>
> Sent: Wednesday, December 23, 2009 1:13pm
> To: users@qpid.apache.org
> Subject: Re: RESOURCE_LIMIT_EXCEEDED exception - any advice?
>
> Hi Slava,
>
> You are getting that exception bcos your
> "seg_orders1caa86344-19c7d-142a1-1b20e-107a0c16a2995" queue is
> overflowing.
> It seems either your subscriber(s) is slow or there is no subscriber
> at all on this queue.
>
> Each queue has a limit (default is 104857600 bytes which is what you
> are using) to protect the broker memory from growing.
>
> Regards,
>
> Rajith
>
> On Wed, Dec 23, 2009 at 12:38 PM,  <sk...@segcap.com> wrote:
>> Hi,
>> I am using RedHat MRG 1.1, and Java client (M4)
>>
>> after some number of messages I am getting an exception:
>>
>> org.apache.qpid.transport.SessionException: ch=0 id=0 ExecutionException(errorCode=RESOURCE_LIMIT_EXCEEDED, commandId=146657, classCode=0, commandCode=0, fieldIndex=0, description=resource-limit-exceeded: Policy exceeded on seg_orders1caa86344-19c7d-142a1-1b20e-107a0c16a2995, policy: size: max=104857600, current=104857493; count: unlimited; type=reject (qpid/broker/QueuePolicy.cpp:83), errorInfo={})
>>
>>
>> Here is how I create session/queue:
>>
>> Map <String, Object> argument = new HashMap<String, Object>();
>>                argument.put("qpid.policy_type", "ring");
>>                argument.put("qpid.max_count", -1);
>>
>>            session.queueDeclare(queueName, null, argument, Option.EXCLUSIVE, Option.AUTO_DELETE);
>>            session.exchangeBind(queueName, "amq.topic", bindingKey, null);
>>
>>
>>            session.messageSubscribe(queueName, queueName,
>>                                     MessageAcceptMode.NONE,
>>                                     MessageAcquireMode.PRE_ACQUIRED,
>>                                     null, 0, null);
>>
>> session.messageFlow(queueName, MessageCreditUnit.BYTE, Session.UNLIMITED_CREDIT);
>>            session.messageFlow(queueName, MessageCreditUnit.MESSAGE, Session.UNLIMITED_CREDIT);
>>
>>
>> Questions:
>> 1. What am I doing wrong?
>> 2. If I am doing nothing wrong, RedHat recommends M4 Jave client on its site, should I use 0.6 or 0.6 instead? What potential problems would that bring?
>> 3. Any other recommendations?
>>
>> Regards,
>> Slava
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
>
>
>
> --
> Regards,
>
> Rajith Attapattu
> Red Hat
> http://rajith.2rlabs.com/
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: RESOURCE_LIMIT_EXCEEDED exception - any advice?

Posted by sk...@segcap.com.
Hi,
actually I do have subscribers, and also I specify queue policy as "ring"

-----------------------------------
Map <String, Object> argument = new HashMap<String, Object>();
                argument.put("qpid.policy_type", "ring");
                argument.put("qpid.max_count", -1);

            session.queueDeclare(queueName, null, argument, Option.EXCLUSIVE, Option.AUTO_DELETE);
            session.exchangeBind(queueName, "amq.topic", bindingKey, null);

---------------------------------


I added default-queue-limit=0
to qpidd.conf,  hope that would help in the interim. But the problem still persists.

Btw, anybody have an estimate when M5 is coming out?

Regards,
Slava



-----Original Message-----
From: "Rajith Attapattu" <ra...@gmail.com>
Sent: Wednesday, December 23, 2009 1:13pm
To: users@qpid.apache.org
Subject: Re: RESOURCE_LIMIT_EXCEEDED exception - any advice?

Hi Slava,

You are getting that exception bcos your
"seg_orders1caa86344-19c7d-142a1-1b20e-107a0c16a2995" queue is
overflowing.
It seems either your subscriber(s) is slow or there is no subscriber
at all on this queue.

Each queue has a limit (default is 104857600 bytes which is what you
are using) to protect the broker memory from growing.

Regards,

Rajith

On Wed, Dec 23, 2009 at 12:38 PM,  <sk...@segcap.com> wrote:
> Hi,
> I am using RedHat MRG 1.1, and Java client (M4)
>
> after some number of messages I am getting an exception:
>
> org.apache.qpid.transport.SessionException: ch=0 id=0 ExecutionException(errorCode=RESOURCE_LIMIT_EXCEEDED, commandId=146657, classCode=0, commandCode=0, fieldIndex=0, description=resource-limit-exceeded: Policy exceeded on seg_orders1caa86344-19c7d-142a1-1b20e-107a0c16a2995, policy: size: max=104857600, current=104857493; count: unlimited; type=reject (qpid/broker/QueuePolicy.cpp:83), errorInfo={})
>
>
> Here is how I create session/queue:
>
> Map <String, Object> argument = new HashMap<String, Object>();
>                argument.put("qpid.policy_type", "ring");
>                argument.put("qpid.max_count", -1);
>
>            session.queueDeclare(queueName, null, argument, Option.EXCLUSIVE, Option.AUTO_DELETE);
>            session.exchangeBind(queueName, "amq.topic", bindingKey, null);
>
>
>            session.messageSubscribe(queueName, queueName,
>                                     MessageAcceptMode.NONE,
>                                     MessageAcquireMode.PRE_ACQUIRED,
>                                     null, 0, null);
>
> session.messageFlow(queueName, MessageCreditUnit.BYTE, Session.UNLIMITED_CREDIT);
>            session.messageFlow(queueName, MessageCreditUnit.MESSAGE, Session.UNLIMITED_CREDIT);
>
>
> Questions:
> 1. What am I doing wrong?
> 2. If I am doing nothing wrong, RedHat recommends M4 Jave client on its site, should I use 0.6 or 0.6 instead? What potential problems would that bring?
> 3. Any other recommendations?
>
> Regards,
> Slava
>
>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org




---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: RESOURCE_LIMIT_EXCEEDED exception - any advice?

Posted by Rajith Attapattu <ra...@gmail.com>.
Hi Slava,

You are getting that exception bcos your
"seg_orders1caa86344-19c7d-142a1-1b20e-107a0c16a2995" queue is
overflowing.
It seems either your subscriber(s) is slow or there is no subscriber
at all on this queue.

Each queue has a limit (default is 104857600 bytes which is what you
are using) to protect the broker memory from growing.

Regards,

Rajith

On Wed, Dec 23, 2009 at 12:38 PM,  <sk...@segcap.com> wrote:
> Hi,
> I am using RedHat MRG 1.1, and Java client (M4)
>
> after some number of messages I am getting an exception:
>
> org.apache.qpid.transport.SessionException: ch=0 id=0 ExecutionException(errorCode=RESOURCE_LIMIT_EXCEEDED, commandId=146657, classCode=0, commandCode=0, fieldIndex=0, description=resource-limit-exceeded: Policy exceeded on seg_orders1caa86344-19c7d-142a1-1b20e-107a0c16a2995, policy: size: max=104857600, current=104857493; count: unlimited; type=reject (qpid/broker/QueuePolicy.cpp:83), errorInfo={})
>
>
> Here is how I create session/queue:
>
> Map <String, Object> argument = new HashMap<String, Object>();
>                argument.put("qpid.policy_type", "ring");
>                argument.put("qpid.max_count", -1);
>
>            session.queueDeclare(queueName, null, argument, Option.EXCLUSIVE, Option.AUTO_DELETE);
>            session.exchangeBind(queueName, "amq.topic", bindingKey, null);
>
>
>            session.messageSubscribe(queueName, queueName,
>                                     MessageAcceptMode.NONE,
>                                     MessageAcquireMode.PRE_ACQUIRED,
>                                     null, 0, null);
>
> session.messageFlow(queueName, MessageCreditUnit.BYTE, Session.UNLIMITED_CREDIT);
>            session.messageFlow(queueName, MessageCreditUnit.MESSAGE, Session.UNLIMITED_CREDIT);
>
>
> Questions:
> 1. What am I doing wrong?
> 2. If I am doing nothing wrong, RedHat recommends M4 Jave client on its site, should I use 0.6 or 0.6 instead? What potential problems would that bring?
> 3. Any other recommendations?
>
> Regards,
> Slava
>
>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


RESOURCE_LIMIT_EXCEEDED exception - any advice?

Posted by sk...@segcap.com.
Hi,
I am using RedHat MRG 1.1, and Java client (M4) 

after some number of messages I am getting an exception:

org.apache.qpid.transport.SessionException: ch=0 id=0 ExecutionException(errorCode=RESOURCE_LIMIT_EXCEEDED, commandId=146657, classCode=0, commandCode=0, fieldIndex=0, description=resource-limit-exceeded: Policy exceeded on seg_orders1caa86344-19c7d-142a1-1b20e-107a0c16a2995, policy: size: max=104857600, current=104857493; count: unlimited; type=reject (qpid/broker/QueuePolicy.cpp:83), errorInfo={})


Here is how I create session/queue:

Map <String, Object> argument = new HashMap<String, Object>();
		argument.put("qpid.policy_type", "ring");
		argument.put("qpid.max_count", -1);
				
	    session.queueDeclare(queueName, null, argument, Option.EXCLUSIVE, Option.AUTO_DELETE);
	    session.exchangeBind(queueName, "amq.topic", bindingKey, null);
	   
	
	    session.messageSubscribe(queueName, queueName,
	                             MessageAcceptMode.NONE,
	                             MessageAcquireMode.PRE_ACQUIRED,
	                             null, 0, null);

session.messageFlow(queueName, MessageCreditUnit.BYTE, Session.UNLIMITED_CREDIT);
	    session.messageFlow(queueName, MessageCreditUnit.MESSAGE, Session.UNLIMITED_CREDIT);


Questions:
1. What am I doing wrong?
2. If I am doing nothing wrong, RedHat recommends M4 Jave client on its site, should I use 0.6 or 0.6 instead? What potential problems would that bring?
3. Any other recommendations?

Regards,
Slava




---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: BDB Message store - rationale?

Posted by Carl Trieloff <cc...@redhat.com>.
On 12/23/2009 08:59 AM, Alan Conway wrote:
> On 12/22/2009 05:50 PM, Rob Springer wrote:
>> Hey all - we have run up against the max open files aspect of using the
>> message store plugin, and would rather not require our users edit
>> limits.conf to be able to run our software (and the fact that we'd just
>> be racing against the scaling up of the number of declared queues is
>> scary), so we were considering potential alternative solutions.
>>
>> The first question that came up was regarding the message store plugin's
>> use of journal files - why is such a large number (8) the default? Why
>> are the queues created per-queue, as opposed to a coarser-grained
>> implementation, etc?
>>
>> Google and mailing list searches didn't reveal a ton of rationale /
>> design discussions, so we figured we'd ask directly...
>>
>> Finally, if this isn't the mailing list to ask this on (is there a Red
>> Hat one for the message store?), could y'all direct me there?
>>
>
> This is the right list, all the relevant people hang out here but 
> maybe on vacation.
>
> I believe the main reason for per-queue journal files is so the queue 
> can be allocated a contiguous block of disk space at the outset which 
> is used as a circular buffer, so disk heads dont have to skip around 
> to write successive messages on the same queue. On your other 
> questions, I'll defer to the author of the store.

It is also for AIO/ aysnc performance and dealing with hardware cache 
effects etc. It allows us to get to >600,000 durable msgs/second/IO 
channel on current hardware by using very efficient write patterns. It 
also allows you to map your storage to multiple LUNs if desired for example.

Carl.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: BDB Message store - rationale?

Posted by Alan Conway <ac...@redhat.com>.
On 12/22/2009 05:50 PM, Rob Springer wrote:
> Hey all - we have run up against the max open files aspect of using the
> message store plugin, and would rather not require our users edit
> limits.conf to be able to run our software (and the fact that we'd just
> be racing against the scaling up of the number of declared queues is
> scary), so we were considering potential alternative solutions.
>
> The first question that came up was regarding the message store plugin's
> use of journal files - why is such a large number (8) the default? Why
> are the queues created per-queue, as opposed to a coarser-grained
> implementation, etc?
>
> Google and mailing list searches didn't reveal a ton of rationale /
> design discussions, so we figured we'd ask directly...
>
> Finally, if this isn't the mailing list to ask this on (is there a Red
> Hat one for the message store?), could y'all direct me there?
>

This is the right list, all the relevant people hang out here but maybe on vacation.

I believe the main reason for per-queue journal files is so the queue can be 
allocated a contiguous block of disk space at the outset which is used as a 
circular buffer, so disk heads dont have to skip around to write successive 
messages on the same queue. On your other questions, I'll defer to the author of 
the store.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org