Configure the Berkeley DB database environment to support at least
<spanclass="bold"><strong>max</strong></span> active transactions. This value
bounds the size of the memory allocated for transactions. Child
transactions are counted as active until they either commit or abort.
</p>
<p>
Transactions that update multiversion databases are not freed until
the last page version that the transaction created is flushed from
cache. This means that applications using multi-version concurrency
control may need a transaction for each page in cache, in the extreme
case.
</p>
<p>
When all of the memory available in the database environment for
transactions is in use, calls to
<aclass="xref"href="txnbegin.html"title="DbEnv::txn_begin()">DbEnv::txn_begin()</a> will fail
(until some active transactions complete). If
<codeclass="classname">DbEnv::set_tx_max()</code> is never called,
the database environment is configured to support at least 100
active transactions.
</p>
<p>
The database environment's number of active transactions may also
be configured using the environment's <ahref="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG"class="olink">DB_CONFIG</a> file. The syntax
of the entry in that file is a single line with the string
"set_tx_max", one or more whitespace characters, and the number of
transactions. Because the <ahref="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG"class="olink">DB_CONFIG</a> file is read when the
database environment is opened, it will silently overrule
configuration done before that time.
</p>
<p>
The <codeclass="methodname">DbEnv::set_tx_max()</code> method configures
a database environment, not only operations performed using the
specified <aclass="link"href="env.html"title="Chapter5. The DbEnv Handle">DbEnv</a> handle.
</p>
<p>
The <codeclass="methodname">DbEnv::set_tx_max()</code> method may not be called after the
<aclass="xref"href="envopen.html"title="DbEnv::open()">DbEnv::open()</a> method is called.
If the database environment already exists when
<aclass="xref"href="envopen.html"title="DbEnv::open()">DbEnv::open()</a> is called, the
information specified to <codeclass="methodname">DbEnv::set_tx_max()</code> will be ignored.
</p>
<p>
The <codeclass="methodname">DbEnv::set_tx_max()</code><span>
<span>
method either returns a non-zero error value or throws an
exception that encapsulates a non-zero error value on