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