1<!--$Id: limits.so,v 10.26 2004/08/13 03:48:05 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB Reference Guide: Log file limits</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<a name="2"><!--meow--></a> 12<table width="100%"><tr valign=top> 13<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Logging Subsystem</dl></b></td> 14<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> 15</td></tr></table> 16<p align=center><b>Log file limits</b></p> 17<p>Log filenames and sizes impose a limit on how long databases may be 18used in a Berkeley DB database environment. It is quite unlikely that an 19application will reach this limit; however, if the limit is reached, 20the Berkeley DB environment's databases must be dumped and reloaded.</p> 21<p>The log filename consists of <b>log.</b> followed by 10 digits, with 22a maximum of 2,000,000,000 log files. Consider an application performing 236000 transactions per second for 24 hours a day, logged into 10MB log 24files, in which each transaction is logging approximately 500 bytes of data. 25The following calculation:</p> 26<blockquote><pre>(10 * 2^20 * 2000000000) / (6000 * 500 * 365 * 60 * 60 * 24) = ~221</pre></blockquote> 27<p>indicates that the system will run out of log filenames in roughly 221 28years.</p> 29<p>There is no way to reset the log filename space in Berkeley DB. If your 30application is reaching the end of its log filename space, you must do 31the following:</p> 32<ol> 33<p><li>Archive your databases as if to prepare for catastrophic failure (see 34<a href="/ref/transapp/archival.html">Database and log file archival</a> 35for more information). 36<p><li>Reset the database's log sequence numbers (see the <b>-r</b> option 37to the <a href="/utility/db_load.html">db_load</a> utility for more information). 38<p><li>Remove all of the log files from the database environment. (This is the 39only situation in which all the log files are removed from an environment; 40in all other cases, at least a single log file is retained.) 41<p><li>Restart your application. 42</ol> 43<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> 44</td></tr></table> 45<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 46</body> 47</html> 48