<!--$Id: limits.so,v 10.26 2004/08/13 03:48:05 bostic Exp $--> <!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> <!--See the file LICENSE for redistribution information.--> <html> <head> <title>Berkeley DB Reference Guide: Log file limits</title> <meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> <meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> </head> <body bgcolor=white> <a name="2"><!--meow--></a> <table width="100%"><tr valign=top> <td><b><dl><dt>Berkeley DB Reference Guide:<dd>Logging Subsystem</dl></b></td> <td align=right><a href="../log/config.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../mp/intro.html"><img src="../../images/next.gif" alt="Next"></a> </td></tr></table> <p align=center><b>Log file limits</b></p> <p>Log filenames and sizes impose a limit on how long databases may be used in a Berkeley DB database environment. It is quite unlikely that an application will reach this limit; however, if the limit is reached, the Berkeley DB environment's databases must be dumped and reloaded.</p> <p>The log filename consists of <b>log.</b> followed by 10 digits, with a maximum of 2,000,000,000 log files. Consider an application performing 6000 transactions per second for 24 hours a day, logged into 10MB log files, in which each transaction is logging approximately 500 bytes of data. The following calculation:</p> <blockquote><pre>(10 * 2^20 * 2000000000) / (6000 * 500 * 365 * 60 * 60 * 24) = ~221</pre></blockquote> <p>indicates that the system will run out of log filenames in roughly 221 years.</p> <p>There is no way to reset the log filename space in Berkeley DB. If your application is reaching the end of its log filename space, you must do the following:</p> <ol> <p><li>Archive your databases as if to prepare for catastrophic failure (see <a href="../../ref/transapp/archival.html">Database and log file archival</a> for more information). <p><li>Reset the database's log sequence numbers (see the <b>-r</b> option to the <a href="../../utility/db_load.html">db_load</a> utility for more information). <p><li>Remove all of the log files from the database environment. (This is the only situation in which all the log files are removed from an environment; in all other cases, at least a single log file is retained.) <p><li>Restart your application. </ol> <table width="100%"><tr><td><br></td><td align=right><a href="../log/config.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../mp/intro.html"><img src="../../images/next.gif" alt="Next"></a> </td></tr></table> <p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> </body> </html>