aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/troubleshooting.xml
blob: 6c40775dbe699e27e37b172a743fa1e157aff9bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<appendix>
  <title>Troubleshooting</title>

  <sect1>
    <title>Database hangs</title>

    <para>
      If Nix or Fix appear to hang immediately after they are started, Nix's
      database is probably <quote>wedged</quote>, i.e., some process died while
      it held a lock on the database.  The solution is to ensure that no other
      processes are accessing the database and then run the following command:
    </para>

    <screen>
      $ db_recover -e -h <replaceable>prefix</replaceable>/var/nix/db</screen>

    <para>
      Here, <replaceable>prefix</replaceable> should be replaced by Nix's
      installation prefix.
    </para>

  </sect1>


  <sect1>
    <title>Database logfile removal</title>

    <para>
      Every time a Nix database transaction takes place, Nix writes a record of
      this transaction to a <emphasis>log</emphasis> in its database directory
      to ensure that the operation can be replayed in case of a application or
      system crash.  However, without manual intervention, the log grows
      indefinitely.  Hence, unused log files should be deleted periodically.
      This can be accomplished using the following command:
    </para>

    <screen>
      $ rm `db_archive -a -h <replaceable>prefix</replaceable>/var/nix/db`</screen>

  </sect1>
	
</appendix>

<!--
local variables:
sgml-parent-document: ("book.xml" "appendix")
end:
-->