Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
:description: This section describes how to manage errors that you may encounter while managing databases.
:page-aliases: manage-databases/errors.adoc
:page-role: enterprise-edition
[[manage-database-errors]]
= Error handling

Expand All @@ -11,8 +12,8 @@ When running the database management queries, such as `CREATE DATABASE`, it is p
Because database management operations are performed asynchronously, these errors may not be returned immediately upon query execution.
Instead, you must monitor the output from the `SHOW DATABASE` command; particularly the `statusMessage` and `currentStatus` columns.

.Fail to create a database
====
=== Fail to create a database

[source, cypher]
----
neo4j@system> CREATE DATABASE foo;
Expand Down Expand Up @@ -51,7 +52,6 @@ In a cluster:

3 row available after 100 ms, consumed after another 6 ms
----
====


[[database-management-states]]
Expand Down Expand Up @@ -91,8 +91,8 @@ However, these retries are not guaranteed to succeed, and errors may persist thr
If a database is in the `quarantined` state, retrying the last operation will not work.
====

.Retry to start a database
====
=== Retry to start a database

[source, cypher]
----
neo4j@system> START DATABASE foo;
Expand Down Expand Up @@ -146,7 +146,6 @@ neo4j@system> SHOW DATABASE foo;

1 rows available after 4 ms, consumed after another 1 ms
----
====

If repeated retries of a command have no effect, or if a database is in a `dirty` state, you may drop and recreate the database, as detailed in xref:database-administration/standard-databases/create-databases.adoc[Create database].

Expand All @@ -162,7 +161,7 @@ It produces a database dump that can be further examined and potentially repaire

There are two ways to get a database into a `quarantined` state:

* By using the xref:procedures.adoc#procedure_dbms_quarantineDatabase[`dbms.quarantineDatabase`] procedure locally to isolate a specific database.
* By using the xref:procedures.adoc#procedure_dbms_quarantineDatabase[`dbms.quarantineDatabase()`] procedure locally to isolate a specific database.
The procedure must be executed on the instance whose copy of the database you want to quarantine.
A reason for that can be, for example, when a database is unable to start on a given instance due to a file system permissions issue with the volume where the database is located or when a recently started database begins to log errors.
The quarantine state renders the database inaccessible on that instance and prevents its state from being changed, for example, with the `START DATABASE` command.
Expand Down Expand Up @@ -210,7 +209,7 @@ The result contains the user, the time, and the reason for the quarantine.

[NOTE]
====
The `dbms.quarantineDatabase` procedure replaces link:{neo4j-docs-base-uri}/operations-manual/4.4/reference/procedures/#procedure_dbms_cluster_quarantinedatabase[`dbms.cluster.quarantineDatabase()`], which has been deprecated in Neo4j 4.3 and will be removed with the next major version.
The `dbms.quarantineDatabase()` procedure replaces link:{neo4j-docs-base-uri}/operations-manual/4.4/reference/procedures/#procedure_dbms_cluster_quarantinedatabase[`dbms.cluster.quarantineDatabase()`], which has been deprecated in Neo4j 4.3 and will be removed with the next major version.
====

.Quarantine a database
Expand Down Expand Up @@ -250,8 +249,8 @@ neo4j@system> SHOW DATABASE foo;
[NOTE]
====
A `quarantined` state is persisted for user databases.
This means that if a database is quarantined, it will remain so even if that Neo4j instance is restarted.
You can remove it only by running the xref:procedures.adoc#procedure_dbms_quarantineDatabase[`dbms.quarantineDatabase`] procedure on the instance where the quarantined database is located, passing `false` for the `setStatus` parameter.
This means that if a database is quarantined, it will remain so even if the Neo4j process is restarted.
You can remove it only by running the xref:procedures.adoc#procedure_dbms_quarantineDatabase[`dbms.quarantineDatabase()`] procedure on the instance where the quarantined database is located, passing `false` for the `setStatus` parameter.

The one exception to this rule is for the built-in `system` database.
Any quarantine for that database is removed automatically after instance restart.
Expand Down