Library Version 18.1.40

DbEnv::rep_set_limit()
Prev | Chapter 11. Replication Methods | Next

## DbEnv::rep_set_limit()

    #include <db_cxx.h>

    int
    DbEnv::rep_set_limit(u_int32_t gbytes, u_int32_t bytes);

The `DbEnv::rep_set_limit()` method sets record transmission throttling. This is a byte-count limit on the amount of data that will be transmitted from a site in response to a single message processed by the DbEnv::rep_process_message() method. The limit is not a hard limit, and the record that exceeds the limit is the last record to be sent.

Record transmission throttling is turned on by default with a limit of 10MB.

If the values passed to the `DbEnv::rep_set_limit()` method are both zero, then the transmission limit is turned off.

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 "rep_set_limit", one or more whitespace characters, and the limit specified in two parts: the gigabytes and the bytes values. For example, "rep_set_limit 0 1048576" sets a 1 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 `DbEnv::rep_set_limit()` method configures a database environment, not only operations performed using the specified DbEnv handle.

The `DbEnv::rep_set_limit()` method may be called at any time during the life of the application.

The `DbEnv::rep_set_limit()` method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

#### gbytes

The gbytes parameter specifies the number of gigabytes which, when added to the bytes parameter, specifies the maximum number of bytes that will be sent in a single call to the DbEnv::rep_process_message() method.

#### bytes

The bytes parameter specifies the number of bytes which, when added to the gbytes parameter, specifies the maximum number of bytes that will be sent in a single call to the DbEnv::rep_process_message() method.

### Class

DbEnv

### See Also

Replication and Related Methods

Prev | Up | Next
DbEnv::rep_set_config() | Home | DbEnv::rep_set_nsites()