diff --git a/doc/manual/troubleshooting.xml b/doc/manual/troubleshooting.xml index e1e6c08c86..ddff0f2970 100644 --- a/doc/manual/troubleshooting.xml +++ b/doc/manual/troubleshooting.xml @@ -4,7 +4,9 @@ Troubleshooting -This section provides solutions for some common problems. +This section provides solutions for some common problems. See +the Nix +bug tracker for a list of currently known issues.
Berkeley DB: <quote>Cannot allocate memory</quote> @@ -77,6 +79,46 @@ $ nix-store --verify
+
Berkeley DB out of locks + +It is possible, especially in nix-store +--verify or when running the garbage collector, to run out +of Berkeley DB locks, like this: + + +$ nix-store --verify +checking path existence +checking path realisability +checking the derivers table +checking the references table +Berkeley DB error: Lock table is out of available object entries +error: Db::get: Cannot allocate memory + + + +A workaround is to increase the number of locks that Berkeley DB +allocates. (The real solution would be for Nix to not use so many +locks.) This can be done by putting the following in the file +/nix/var/nix/db/DB_CONFIG: + + +set_lk_max_locks 100000 +set_lk_max_lockers 100000 +set_lk_max_objects 100000 + + +(Increase these numbers if necessary.) Then make sure that there are +no running Nix processes and delete the Berkeley DB environment: + + +$ rm /nix/var/nix/db/__db.* + +The Berkeley DB environment is automatically recreated with the new +limits when you run any Nix command. + +
+
Collisions in <command>nix-env</command>