From 12d0a1eb753567bb2083aadb4ee3d325d3f29c70 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 29 Nov 2007 14:15:33 +0000 Subject: * Troubleshooting entry about running out of locks. --- doc/manual/troubleshooting.xml | 44 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/manual/troubleshooting.xml b/doc/manual/troubleshooting.xml index e1e6c08c8649..ddff0f2970c7 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> -- cgit 1.4.1