Configuration Options

Location of config options

All config options from Reference of config options can be provided either in:

Option Description

environment variables

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

conf/apoc.conf

located in the same folder as neo4j.conf

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

APOC Extended 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

  • apoc.export.file.enabled: Enables writing local files to disk.

  • apoc.import.file.enabled: Enables reading local files from disk.

  • apoc.import.file.use_neo4j_config: Uses Neo4j configuration settings when reading local files from disk.

  • apoc.http.timeout.connect: Sets an timeout for outbound HTTP connection establishment.

  • apoc.http.timeout.read: Set a timeout for outbound HTTP reads.

  • apoc.jobs.scheduled.num_threads: Scheduled execution thread pool size.

  • apoc.jobs.pool.num_threads: Background execution thread pool size.

  • apoc.jobs.queue.size: Background execution job queue size.

  • apoc.couchbase.<key>.uri: Store couchbase-urls under a key to be used by couchbase procedures

  • apoc.es.<key>.uri: store es-urls under a key to be used by elasticsearch procedures

  • apoc.jdbc.<key>.uri: store jdbc-urls under a key to be used by apoc.load.jdbc

  • apoc.mongodb.<key>.uri: store mongodb-urls under a key to be used by mongodb procedures

  • apoc.ttl.enabled: Enable time to live background task

  • apoc.ttl.enabled.<name_db>: Enable 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

  • apoc.ttl.schedule: Set frequency in seconds to run ttl background task

  • apoc.ttl.schedule.<name_db>: 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.

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

  • apoc.ttl.limit.<name_db>: 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.

  • apoc.uuid.enabled: global switch to enable uuid handlers

  • apoc.uuid.enabled.<name_db>: 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

Table 1. apoc.export.file.enabled

Description

Enables writing local files to disk.

Valid values

Booleans

Default value

false

Table 2. apoc.import.file.enabled

Description

Enables reading local files from disk.

Valid values

Booleans

Default value

false

Table 3. apoc.import.file.use_neo4j_config

Description

If enabled, this setting controls 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 server.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, then 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 a specified timeout value, in milliseconds, to be used when communicating with a URI. If the timeout expires before the data is available to be read, then an exception is raised. A timeout of zero is interpreted as an infinite timeout.

Valid values

Integers

Default value

60000

Table 6. apoc.jobs.scheduled.num_threads

Description

The apoc.periodic.* procedures rely on a scheduled executor that has a pool of threads with a default fixed size. The pool size can be configured using this configuration property.

Valid values

Integers

Default value

number of CPU cores / 4

Table 7. apoc.jobs.pool.num_threads

Description

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

Valid values

Integers

Default value

number of CPU cores * 2

Table 8. apoc.jobs.queue.size

Description

Size of the ThreadPoolExecutor working queue.

Valid values

Integers

Default value

apoc.jobs.pool.num_threads * 5

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

Description

store couchbase-urls under a key to be used by the 1st parameter of the couchbase procedures

Valid values

Strings

Default value

null, that is pick the url from the the 1st parameter of the couchbase procedures

Table 10. apoc.es.<key>.uri=es-url-with-credentials

Description

store es-urls under a key to be used by the 1st parameter of the elasticsearch procedures

Valid values

Strings

Default value

null, that is pick the url from the 1st parameter of the elasticsearch procedures

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

Description

store jdbc-urls under a key to be used by the 1st parameter of the apoc.load.jdbc procedures

Valid values

Strings

Default value

null, that is pick the url from the 1st parameter of the apoc.load.jdbc procedures

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

Description

store jdbc-urls under a key to be used by the 1st parameter of the mongodb procedures

Valid values

Strings

Default value

null, that is pick the url from the 1st parameter of the mongodb procedures

Table 13. apoc.ttl.enabled

Description

Enable time to live background task

Valid values

Booleans

Default value

false

Table 14. apoc.ttl.enabled.<name_db>

Description

Enable 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

apoc.ttl.enabled config value

Table 15. apoc.ttl.schedule

Description

Set frequency in seconds to run ttl background task

Valid values

Integers

Default value

60

Table 16. apoc.ttl.schedule.<name_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

apoc.ttl.schedule config value

Table 17. 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 18. apoc.ttl.limit.<name_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 19. apoc.uuid.enabled

Description

Global switch to enable uuid handlers

Valid values

Booleans

Default value

false

Table 20. apoc.jobs.queue.size

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

apoc.uuid.enabled config value