Configuration Options

APOC for 4.0 introduces new configuration management. All config options from Reference of config options can be provided either in:

environment variables

set them either via export key=val or via --env settings when used for docker.

system properties

best to use via dbms.jvm.additional form conf/neo4j.conf

conf/apoc.conf

located side-by-side with conf/neo4j.conf using the very same property style notation

The order of this table matches their config option precedence. E.g. any env setting will override options set in apoc.conf.

APOC internally relies on Apache commons-config for resolving config settings. The meta-configuration is located in src/main/resources/apoc-config.xml.

Reference of config options

Table 1. apoc.export.file.enabled

Description

Enable writing local files to disk.

Valid values

Booleans

Default value

false

Table 2. apoc.import.file.enabled

Description

Enable reading local files from disk

Valid values

Booleans

Default value

false

Table 3. apoc.import.file.use_neo4j_config

Description

The procedures check whether file system access is allowed and possibly constrained to a specific directory by reading the two configuration parameters dbms.security.allow_csv_import_from_file_urls and dbms.directories.import respectively.

Valid values

Booleans

Default value

true

Table 4. apoc.http.timeout.connect

Description

Sets a specified timeout value, in milliseconds, to be used when communicating with a URI. If the timeout expires before the connection can be established, an exception is raised. A timeout of zero is interpreted as an infinite timeout.

Valid values

Integers

Default value

10000

Table 5. apoc.http.timeout.read

Description

Sets the read timeout to a specified timeout, in milliseconds. A non-zero value specifies the timeout when reading from a connection established to a resource. If the timeout expires before there is data available for read, an exception is raised. A timeout of zero is interpreted as an infinite timeout.

Valid values

Integers

Default value

10000

Table 6. apoc.initializer.cypher

Description

Cypher statement to be executed once the database is started.

Valid values

String

Default value

None

Table 7. apoc.initializer.cypher.<key>

Description

Multiple Cypher statements to be executed once the database is started.

Valid values

String

Default value

None

Table 8. apoc.jobs.scheduled.num_threads

Description

Many periodic procedures rely on a scheduled executor that has a pool of threads with a default fixed size. You can configure the pool size using this configuration property.

Valid values

Integers

Default value

CPU cores / 4

Table 9. apoc.jobs.pool.num_threads

Description

Number of threads in the default APOC thread pool used for background executions.

Valid values

Integers

Default value

CPU cores * 2

Table 10. apoc.jobs.queue.size

Description

Size of the queue ThreadPoolExecutor working queue

Valid values

Integers

Default value

apoc.jobs.pool.num_threads * 5

Table 11. apoc.trigger.enabled

Description

Enables triggers.

Valid values

Booleans

Default value

false

Table 12. apoc.uuid.enabled

Description

Global switch to enable uuid handlers.

Valid values

Booleans

Default value

false

Table 13. apoc.uuid.enabled.<db>

Description

Enable/disable uuid handlers for a specific db. Please note that this key has to be set necessarily in apoc.conf. If is true UUID is enabled for the db even if apoc.uuid.enabled is false, instead if is false is disabled for the db even if apoc.uuid.enabled is true.

Valid values

Booleans

Default value

true

Table 14. apoc.ttl.enabled

Description

Enable time to live background task

Valid values

Booleans

Default value

false

Table 15. apoc.ttl.enabled.<db>

Description

Enables time to live background task for a specific db. Please note that this key has to be set necessarily in apoc.conf. If is true TTL is enabled for the db even if apoc.ttl.enabled is false, instead if is false is disabled for the db even if apoc.ttl.enabled is true.

Valid values

Booleans

Default value

true

Table 16. apoc.ttl.schedule

Description

Set frequency in seconds to run ttl background task

Valid values

Integers

Default value

60

Table 17. apoc.ttl.schedule.<db>

Description

Set frequency in seconds to run ttl background task for a specific db. It has priority over apoc.ttl.schedule. Please note that this key has to be set necessarily in apoc.conf.

Valid values

Integers

Default value

60

Table 18. apoc.ttl.limit

Description

Maximum number of nodes being deleted in one background transaction, that is the batchSize applied to apoc.periodic.iterate() during removing nodes.

Valid values

Integers

Default value

1000

Table 19. apoc.ttl.limit.<db>

Description

Maximum number of nodes being deleted in one background transaction for a specific db, that is the batchSize applied to apoc.periodic.iterate() during removing nodes for a specific db. It has priority over apoc.ttl.limit. Please note that this key has to be set necessarily in apoc.conf.

Valid values

Integers

Default value

1000

Table 20. apoc.spatial.geocode.provider

Description

Configuration for geocoding providers, keys and values are provider specific, see Configuring Geocode Provider.

Valid values

String

Default value

None

Table 21. apoc.spatial.geocode.<providerName>.<key>

Description

Configuration for geocoding providers, keys and values are provider specific, see Configuring Geocode Provider.

Valid values

String

Default value

None

Table 22. apoc.jdbc.<key>.uri

Description

Store JDBC URLs under a key to be used by apoc.load.jdbc. The URLs must contain credentials.

Valid values

URL

Default value

None

Table 23. apoc.couchbase.<key>.uri

Description

Store CouchBase URLs under a key to be used by couchbase procedures. The URLs must contain credentials.

Valid values

URLs

Default value

None

Table 24. apoc.es.<key>.uri

Description

Store ElasticSearch URLs under a key to be used by elasticsearch procedures. The URLs must contain credentials.

Valid values

URLs

Default value

None

Table 25. apoc.mongodb.<key>.uri

Description

Store MongoDB URLs under a key to be used by MongoDB procedures. The URLs must contain credentials.

Valid values

URL

Default value

None

Table 26. apoc.max.decompression.ratio

Description

Limits the relative size a decompressed file can reach with respect to the compressed file in the loading procedures. If negative, no limit to the decompressed size is imposed.

Valid values

Integers different from 0

Default value

200