ArangoDB Server Database Options

Auto upgrade

—database.auto-upgrade

Specifying this option will make the server perform a database upgrade insteadof starting the server normally. A database upgrade will first compare theversion number stored in the file VERSION in the database directory with thecurrent server version.

If the version number found in the database directory is higher than the versionnumber the server is running, the server expects this is an unintentionaldowngrade and will warn about this. Using the server in these conditions isneither recommended nor supported.

If the version number found in the database directory is lower than the versionnumber the server is running, the server will check whether there are anyupgrade tasks to perform. It will then execute all required upgrade tasks andprint their statuses. If one of the upgrade tasks fails, the server will exitwith an error. Re-starting the server with the upgrade option will then againtrigger the upgrade check and execution until the problem is fixed.

Whether or not this option is specified, the server will always perform aversion check on startup. Running the server with a non-matching version numberin the VERSION file will make the server refuse to start.

Directory

—database.directory directory

The directory containing the collections and datafiles. Defaultsto /var/lib/arango. When specifying the database directory, pleasemake sure the directory is actually writable by the arangod process.

You should further not use a database directory which is provided by anetwork filesystem such as NFS. The reason is that networked filesystemsmight cause inconsistencies when there are multiple parallel readers orwriters or they lack features required by arangod (e.g. flock()).

directory

When using the command line version, you can simply supply the databasedirectory as argument.

Examples

  1. > ./arangod --server.endpoint tcp://127.0.0.1:8529 --database.directory
  2. /tmp/vocbase

Database directory state precondition

—database.require-directory-state state

Using this option it is possible to require the database directory to bein a specific state on startup. the options for this value are:

  • non-existing: database directory must not exist
  • existing: database directory must exist
  • empty: database directory must exist but be empty
  • populated: database directory must exist and contain specific files already
  • any: any directory state allowed

Force syncing of properties

force syncing of collection properties to disk—database.force-sync-properties boolean

Force syncing of collection properties to disk after creating a collectionor updating its properties.

If turned off, no fsync will happen for the collection and databaseproperties stored in parameter.json files in the file system. Turningoff this option will speed up workloads that create and drop a lot ofcollections (e.g. test suites).

The default is true.

Maximal Journal size (MMFiles only)

—database.maximal-journal-size size

Maximal size of journal in bytes. Can be overwritten when creating a newcollection. Note that this also limits the maximal size of a singledocument.

The default is 32MB.

Wait for sync

default wait for sync behavior—database.wait-for-sync boolean

Default wait-for-sync value. Can be overwritten when creating a newcollection.

The default is false.

More advanced options

—database.throw-collection-not-loaded-error flag

Accessing a not-yet loaded collection will automatically load a collection onfirst access. This flag controls what happens in case an operation would need towait for another thread to finalize loading a collection. If set to true, thenthe first operation that accesses an unloaded collection will load it. Furtherthreads that try to access the same collection while it is still loading willget an error (1238, collection not loaded). When the initial operation hascompleted loading the collection, all operations on the collection can becarried out normally, and error 1238 will not be thrown.

If set to false, the first thread that accesses a not-yet loaded collectionwill still load it. Other threads that try to access the collection whileloading will not fail with error 1238 but instead block until the collection isfully loaded. This configuration might lead to all server threads being blockedbecause they are all waiting for the same collection to completeloading. Setting the option to true will prevent this from happening, butrequires clients to catch error 1238 and react on it (maybe by scheduling aretry for later).

The default value is false.

—database.replication-applier flag

Enable/disable replication applier.

If false the server will start with replication appliers turned off,even if the replication appliers are configured with the autoStart option.Using the command-line option will not change the value of the _autoStart_option in the applier configuration, but will suppress auto-starting thereplication applier just once.

If the option is not used, ArangoDB will read the applier configurationfrom the file REPLICATION-APPLIER-CONFIG on startup, and use the value ofthe autoStart attribute from this file.

The default is true.