1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>Log file limits</title> 7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> 10 <link rel="up" href="log.html" title="Chapter��16.�� The Logging Subsystem" /> 11 <link rel="prev" href="log_config.html" title="Configuring logging" /> 12 <link rel="next" href="mp.html" title="Chapter��17.�� The Memory Pool Subsystem" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Log file limits</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="log_config.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��16.�� 23 The Logging Subsystem 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="mp.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="log_limits"></a>Log file limits</h2> 35 </div> 36 </div> 37 </div> 38 <p>Log filenames and sizes impose a limit on how long databases may be 39used in a Berkeley DB database environment. It is quite unlikely that an 40application will reach this limit; however, if the limit is reached, 41the Berkeley DB environment's databases must be dumped and reloaded.</p> 42 <p>The log filename consists of <span class="bold"><strong>log.</strong></span> followed by 10 digits, with 43a maximum of 2,000,000,000 log files. Consider an application performing 446000 transactions per second for 24 hours a day, logged into 10MB log 45files, in which each transaction is logging approximately 500 bytes of data. 46The following calculation:</p> 47 <pre class="programlisting">(10 * 2^20 * 2000000000) / (6000 * 500 * 365 * 60 * 60 * 24) = ~221</pre> 48 <p>indicates that the system will run out of log filenames in roughly 221 49years.</p> 50 <p>There is no way to reset the log filename space in Berkeley DB. If your 51application is reaching the end of its log filename space, you must do 52the following:</p> 53 <div class="orderedlist"> 54 <ol type="1"> 55 <li>Archive your databases as if to prepare for catastrophic failure (see 56<a class="xref" href="transapp_archival.html" title="Database and log file archival">Database and log file archival</a> 57for more information).</li> 58 <li>Reset the database's log sequence numbers (see the <span class="bold"><strong>-r</strong></span> option 59to the <a href="../api_reference/C/db_load.html" class="olink">db_load utility</a> for more information).</li> 60 <li>Remove all of the log files from the database environment. (This is the 61only situation in which all the log files are removed from an environment; 62in all other cases, at least a single log file is retained.)</li> 63 <li>Restart your application.</li> 64 </ol> 65 </div> 66 </div> 67 <div class="navfooter"> 68 <hr /> 69 <table width="100%" summary="Navigation footer"> 70 <tr> 71 <td width="40%" align="left"><a accesskey="p" href="log_config.html">Prev</a>��</td> 72 <td width="20%" align="center"> 73 <a accesskey="u" href="log.html">Up</a> 74 </td> 75 <td width="40%" align="right">��<a accesskey="n" href="mp.html">Next</a></td> 76 </tr> 77 <tr> 78 <td width="40%" align="left" valign="top">Configuring logging��</td> 79 <td width="20%" align="center"> 80 <a accesskey="h" href="index.html">Home</a> 81 </td> 82 <td width="40%" align="right" valign="top">��Chapter��17.�� 83 The Memory Pool Subsystem 84 </td> 85 </tr> 86 </table> 87 </div> 88 </body> 89</html> 90