#include <db.h> int DB_ENV->repmgr_set_incoming_queue_max(DB_ENV *env, u_int32_t gbytes, u_int32_t bytes);
The DB_ENV->repmgr_set_incoming_queue_max()
method sets
a byte-count limit on the amount of dynamic memory used by the Replication Manager
incoming queue. When the incoming queue reaches this limit, incoming messages are
dropped until the Replication Manager processes some of the messages already in
the queue. Any dropped messages are automatically rerequested at a later time.
This limit is not a hard limit, and the message that exceeds this limit is the
last one to be enqueued.
The Replication Manager incoming queue has a default size limit of 100MB. We recommend a minimum size limit of 32MB.
If the values passed to the DB_ENV->repmgr_set_incoming_queue_max()
method are both zero, then the incoming queue size limit is turned off.
We recommend increasing the incoming queue size limit in the following cases:
Master leases are enabled, particularly if there are many DB_REP_LEASE_EXPIRED errors.
Clients are far behind the master.
The master is using bulk transfer to send groups of records to the clients in a single network transfer.
The master has blob databases and is performing many blob operations on them.
The master is performing intensive write operations.
The database environment's replication subsystem may also be configured using the environment's DB_CONFIG file. The syntax of the entry in that file is a single line with the string "repmgr_set_incoming_queue_max", one or more whitespace characters, and the limit specified in two parts: the gigabytes and the bytes values. For example, "repmgr_set_incoming_queue_max 0 104857600" sets a 100 megabyte limit. Because the DB_CONFIG file is read when the database environment is opened, it will silently overrule configuration done before that time.
The DB_ENV->repmgr_set_incoming_queue_max()
method
configures a database environment, not only operations performed
using the specified DB_ENV handle.
The DB_ENV->repmgr_set_incoming_queue_max()
method may be
called at any time during the life of the application. If the limit is reduced,
messages already in the queue are not removed, but further incoming messages are not
added to the queue until its size drops below the new limit.
The DB_ENV->repmgr_set_incoming_queue_max()
method returns a non-zero error value on failure and 0 on success.
The gbytes parameter specifies the number of gigabytes which, when added to the bytes parameter, specifies the maximum size limit of the incoming queue.