Berkeley DB Reference Guide: Log file limits
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++

### Berkeley DB Reference Guide: Logging Subsystem |

# Log file limits

Log file names 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.

The log file name consists of log. 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, where each transaction is logging approximately 500 bytes of data. The calculation:

>     (10 * 2^20 * 2000000000) / (6000 * 500 * 365 * 60 * 60 * 24) = ~221

indicates that the system will run out of log file names in roughly 221 years.

There is no way to reset the log file name space in Berkeley DB. If your application is reaching the end of its log file name space, you must:

1. Archive your databases as if to prepare for catastrophic failure (see db_archive for more information).

2. Dump and re-load all your databases (see db_dump and db_load for more information).

3. Remove all of the log files from the database environment. Note, this is the only situation where all of the log files are removed from an environment, in all other cases at least a single log file is retained.

4. Restart your application.

Copyright Sleepycat Software