Administration Guide

Software Stack

Component Type Version

OrientDB

Graph Database

3.0.x

Ferma

OGM

2.4.x

Elasticsearch

Search Engine

6.1.x

Vert.x

Core Framework

3.7.x

Hazelcast

In-Memory Data Grid

3.10.x

Dagger 2

Dependency Injection

2.11.x

You can find the components' current version numbers by querying the Gentics Mesh demo instance https://demo.getmesh.io/api/v2/ or your local instance http://localhost:8080/api/v2/.

Run with Docker

Alternatively you can start Gentics Mesh using Docker via:

The mesh-demo image contains Gentics Mesh together with demo content and our demo application.

docker run -p 8080:8080 gentics/mesh-demo

The mesh image contains an empty Gentics Mesh server without any demo content.

docker run -p 8080:8080 gentics/mesh
or
docker run \
 -v mesh-graphdb:/graphdb \
 -v mesh-uploads:/uploads \
 -p 8080:8080 \
 gentics/mesh

Volumes / Locations

Name Description Default Environment Setting

/uploads

Location for fileuploads

MESH_BINARY_DIR=/uploads

/graphdb

Location for the graph database data

MESH_GRAPH_DB_DIRECTORY=/graphdb

/config

Location for configuration files

-

/keystore

Location for the main keystore file which contains the cryptographic keys which are used to sign the JWT.

MESH_AUTH_KEYSTORE_PATH=/keystore/keystore.jks

/backups

Backup data location

MESH_GRAPH_BACKUP_DIRECTORY=/backups

/plugins

Plugin data and configuration location

MESH_PLUGIN_DIR=/plugins

/mesh/data

Remaining data files (e.g. temp dirs, caches)

-

Docker Compose

We also provide a ready to go docker-compose example stack for Gentics Mesh:

Single node setup with included Elasticsearch container:

Multi node clustering setup:

Environment Variables

Settings within the mesh.yml file can be override via these environment variables.

Variable Description

MESH_HTTP_CORS_ENABLE

Override the configured CORS enable flag.

MESH_GRAPH_STARTSERVER

Override the graph database server flag.

MESH_HTTP_SSL_ENABLE

Override the configured SSL enable flag.

MESH_GRAPH_TX_RETRY_LIMIT

Override the transaction retry limit. Default: 10

MESH_HTTP_VERTICLE_AMOUNT

Override the http verticle amount.

MESH_PLUGIN_TIMEOUT

Override the configured plugin timeout.

MESH_CLUSTER_NETWORK_HOST

Override the cluster network host.

MESH_LOCK_PATH

Path to the mesh lock file.

MESH_PLUGIN_DIR

Override the configured plugin directory.

MESH_MONITORING_HTTP_HOST

Override the configured monitoring http server host which is used to bind to.

MESH_VERTX_WORKER_POOL_SIZE

Override the configured Vert.x worker pool size.

MESH_HTTP_SSL_CERT_PATH

Override the configured SSL enable flag.

MESH_CONTENT_AUTO_PURGE

Override the content versioning flag

MESH_BINARY_DOCUMENT_PARSER_LIMIT

Override the configured parser limit.

MESH_HTTP_HOST

Override the configured http server host which is used to bind to.

MESH_AUTH_TOKEN_EXP

Override the configured JWT expiration time.

MESH_IMAGE_MAX_HEIGHT

Override the max height for image resize operations.

MESH_ELASTICSEARCH_MAPPING_MODE

Override the search mapping mode.

MESH_ELASTICSEARCH_WAIT_FOR_IDLE

Override the search idle wait flag.

MESH_DEBUGINFO_LOG_FOLDER

Override the path to the debug info log folder

MESH_ELASTICSEARCH_HOSTNAME_VERIFICATION

Override the configured hostname verification flag.

MESH_CLUSTER_VERTX_PORT

Override the vert.x eventbus server port.

MESH_GRAPH_SYNC_WRITES

Override the graph database sync writes flag.

MESH_HTTP_CORS_ALLOW_CREDENTIALS

Override the configured CORS allowed credentials flag.

MESH_INITIAL_ADMIN_PASSWORD_FORCE_RESET

Control whether a forced password reset should be triggered when creating the initial admin user. Default: true

MESH_ELASTICSEARCH_STARTUP_TIMEOUT

Override the configured elasticsearch server timeout.

MESH_AUTH_PUBLIC_KEYS_PATH

Override the configured public keys file path.

MESH_LANGUAGES_FILE_PATH

Override the path to the optional languages file

MESH_ELASTICSEARCH_PREFIX

Override the configured elasticsearch prefix.

MESH_HTTP_PORT

Override the configured server http port.

MESH_AUTH_KEYSTORE_PASS

Override the configured keystore password.

MESH_BINARY_DOCUMENT_PARSER

Override the document parser enabled flag.

MESH_MONITORING_JVM_METRICS_ENABLED

Override the configured JVM metrics enabled flag.

MESH_GRAPH_EXPORT_DIRECTORY

Override the graph database export directory.

MESH_CACHE_PATH_SIZE

Override the path cache size.

MESH_ELASTICSEARCH_CERT_PATH

Override the configured trusted server certificate.

MESH_ELASTICSEARCH_PASSWORD

Override the configured Elasticsearch connection password.

MESH_BINARY_UPLOAD_LIMIT

Override the configured binary byte upload limit.

MESH_MONITORING_HTTP_PORT

Override the configured monitoring server http port.

MESH_ELASTICSEARCH_COMPLIANCE_MODE

Override the search compliance mode.

MESH_HTTP_SSL_KEY_PATH

Override the configured SSL enable flag.

MESH_TEMP_DIR

Override the configured temp directory.

MESH_MONITORING_ENABLED

Override the configured monitoring enabled flag.

MESH_DEBUGINFO_LOG_ENABLED

Enables the debug info log

MESH_ELASTICSEARCH_RETRY_LIMIT

Override the retry limit.

MESH_ELASTICSEARCH_BULK_LENGTH_LIMIT

Override the batch bulk length limit. Default: 5000000

MESH_ELASTICSEARCH_URL

Override the configured elasticsearch server url. The value can be set to null in order to disable the Elasticsearch support.

MESH_ELASTICSEARCH_INCLUDE_BINARY_FIELDS

Override the search include binary fields flag.

MESH_GRAPH_TX_RETRY_DELAY

Override the transaction retry delay. Default: 10

MESH_BINARY_DIR

Override the configured binary data directory.

MESH_DEBUGINFO_LOG_FILE_SIZE

Override the log file size

MESH_UPDATECHECK

Override the configured updatecheck flag.

MESH_ELASTICSEARCH_START_EMBEDDED

Override the start embedded elasticsearch server flag.

MESH_AUTH_JWT_ALGO

Override the configured algorithm which is used to sign the JWT.

MESH_ELASTICSEARCH_BULK_LIMIT

Override the batch bulk limit. Default: 100

MESH_ELASTICSEARCH_RETRY_INTERVAL

Override the retry interval.

MESH_ELASTICSEARCH_USERNAME

Override the configured Elasticsearch connection username.

MESH_ELASTICSEARCH_EVENT_BUFFER_SIZE

Override the configured event buffer size.

MESH_GRAPH_BACKUP_DIRECTORY

Override the graph database backup directory.

MESH_HTTP_CORS_ORIGIN_PATTERN

Override the configured CORS allowed origin pattern.

MESH_DEFAULT_LANG

Override the configured default language.

MESH_IMAGE_RESAMPLE_FILTER

Override the sample filter for image resize operations.

MESH_CLUSTER_NAME

Override the cluster name.

MESH_ELASTICSEARCH_BULK_DEBOUNCE_TIME

Override the bulk debounce time.

MESH_ELASTICSEARCH_CA_PATH

Override the configured common authority certificate path.

MESH_ELASTICSEARCH_TIMEOUT

Override the configured elasticsearch server timeout.

MESH_IMAGE_MAX_WIDTH

Override the max width for image resize operations.

MESH_VERTX_EVENT_POOL_SIZE

Override the configured Vert.x event pool size.

MESH_AUTH_ANONYMOUS_ENABLED

Override the configured anonymous enabled flag.

MESH_DEBUGINFO_LOG_PATTERN

Override the log pattern

MESH_CLUSTER_INIT

Enable or disable the initial cluster database setup. This is useful for testing.

MESH_BINARY_UPLOAD_TEMP_DIR

Override the configured upload temporary directory.

MESH_GRAPH_DB_DIRECTORY

Override the graph database storage directory.

MESH_NODE_NAME

Override the configured node name.

MESH_IMAGE_JPEG_QUALITY

Override the JPEG quality for image resize operations.

MESH_START_IN_READ_ONLY

Override the read only mode flag.

MESH_INITIAL_ADMIN_PASSWORD

Password which will be used during initial admin user creation.

MESH_CLUSTER_ENABLED

Override cluster enabled flag.

MESH_ELASTICSEARCH_IDLE_DEBOUNCE_TIME

Override the idle debounce time.

MESH_AUTH_KEYSTORE_PATH

Override the configured keystore path.

Run with JAR File

Good news: there is no dedicated installation procedure for Gentics Mesh!

All you need is to download the Gentics Mesh JAR file and start by executing

java -jar mesh-demo-X.X.X.jar

Gentics Mesh comes with OrientDB, an embedded graph database, and Elasticsearch. There are no external dependencies besides Java Runtime 8. On first startup, Gentics Mesh will create the data folder and subfolders, set a password for the keystore file and provide the configuration files mesh.yml and mesh-ui-config.js. See Installation Directory for a detailed discussion on Gentics Mesh files & folders.

Command Line Arguments

Various command line arguments can be used to override or supplement previously configured settings.

usage: mesh.jar
 -clusterName <name>              Override the cluster name. Setting a
                                  cluster name will also enable
                                  clustering.
 -disableElasticsearch            Flag which can be used to disable the
                                  Elasticsearch integration.
 -elasticsearchUrl <url>          Elasticsearch URL to be used.
 -embeddedElasticsearch <flag>    Flag which can be used to disable the
                                  embedded Elasticsearch server.
 -help                            This output
 -httpPort <port>                 Override the configured server HTTP
                                  port.
 -initCluster                     Flag which can be used to initialise the
                                  first instance of a cluster. This is
                                  usually only used for testing or setup
                                  of fresh cluster instances.
 -nodeName <name>                 Override the configured node name.
 -resetAdminPassword <password>   Reset the admin password. It is advised
                                  to change the password once again after
                                  the reset has been performed.

Installation Directory

On first startup, Gentics Mesh will create all files and folders.

 data
    binaryFiles
    binaryImageCache
    graphdb
    tmp
 config
    keystore.jceks
    default-distributed-db-config.json
    orientdb-server-config.xml
    security.json
    hazelcast.xml
    mesh-ui-config.js
    mesh.yml
elasticsearch

Gentics Mesh ships with two configuration files:

  1. The main configuration file mesh.yml contains all settings for configuring the Gentics Mesh server. All settings are explained in the Configuration & Settings section.

  2. User interface related settings can be changed in mesh-ui-config.js.

All data of your Gentics Mesh instance can be found in the respective subfolders of data.

The folder binaryFiles contains all media assets of your projects including images and other files. binaryImageCache keeps resized versions of requested images. The OrientDB graph data is stored within the graphdb folder. tmp is used by Vert.x and other components e.g. for file uploads.

This folder structure is the default. All paths can be configured in the main configuration file mesh.yml.

The keystore file, by default, is named keystore.jceks. On first startup, a password for the keystore file is created randomly and stored in mesh.yml.

The elasticsearch folder contains the included Elasticsearch installation which will be started by default.

System Requirements

Server Requirements

Gentics Mesh comes with OrientDB, an embedded graph database and Elasticsearch. There are no external dependencies besides Java Runtime 8.

System Configuration

The maximum open file limit on Linux has to be raised on most Linux systems since the embedded graph database and Elasticsearch server often exceed the amount of concurrent open files.

Edit /etc/security/limits.conf and add these two lines:

Mesh   soft    nofile  60000
Mesh   hard    nofile  60000

Edit /etc/pam.d/su and uncomment or add the following line:

session    required   pam_limits.so
This change may require a logout and login.

Client Requirements

The Gentics Mesh user interface has been designed mobile-first and does not impose any specific requirements other than enabled JavaScript. It can be used with any "modern" browser, i.e. IE11+ and latest versions of Chrome, Firefox, and Safari.

Configuration & Settings

All settings can be found in the main mesh.yml configuration file, that contains various settings for configuring HTTP & SSL, the graph database, and file upload. The settings for the Gentics Mesh user interface can be found in mesh-ui-config.js.

Both files are located directly in the installation directory.

---
defaultMaxDepth: 10
defaultLanguage: "en"
languagesFilePath: null
updateCheck: true
vertxOptions:
  workerPoolSize: 20
  eventPoolSize: 16
tempDirectory: "/opt/mesh/data/tmp"
pluginDirectory: "plugins"
pluginTimeout: 15
nodeName: null
startInReadOnly: false
httpServer:
  port: 8080
  host: "0.0.0.0"
  corsAllowedOriginPattern: ""
  corsAllowCredentials: false
  enableCors: false
  ssl: false
  certPath: "config/cert.pem"
  keyPath: "config/key.pem"
  verticleAmount: 16
monitoring:
  enabled: true
  port: 8081
  host: "127.0.0.1"
  jvmMetricsEnabled: true
cluster:
  networkHost: null
  enabled: false
  clusterName: null
  vertxPort: 0
storage:
  directory: "data/graphdb"
  backupDirectory: "data/backup"
  exportDirectory: "data/export"
  startServer: false
  synchronizeWrites: true
  txRetryDelay: 10
  txRetryLimit: 10
  parameters: {}
search:
  url: "http://localhost:9200"
  username: null
  password: null
  certPath: null
  caPath: null
  hostnameVerification: true
  timeout: 60000
  startupTimeout: 45
  startEmbedded: true
  embeddedArguments: "-Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75\
    \ -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -client -Xss1m -Djava.awt.headless=true\
    \ -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true\
    \ -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0\
    \ -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -XX:+HeapDumpOnOutOfMemoryError"
  prefix: "mesh-"
  bulkLimit: 100
  bulkLengthLimit: 5000000
  eventBufferSize: 1000
  bulkDebounceTime: 2000
  idleDebounceTime: 100
  retryInterval: 5000
  retryLimit: 3
  waitForIdle: true
  includeBinaryFields: true
  mappingMode: "DYNAMIC"
  complianceMode: "ES_6"
upload:
  byteLimit: 262144000
  directory: "data/binaryFiles"
  tempDirectory: "/opt/mesh/data/tmp/temp-uploads"
  parserLimit: 40000
  parser: true
security:
  tokenExpirationTime: 3600
  keystorePassword: "<Your Password>"
  keystorePath: "config/keystore.jceks"
  algorithm: "HS256"
  enableAnonymousAccess: true
  publicKeysPath: "config/public-keys.json"
image:
  imageCacheDirectory: "data/binaryImageCache"
  maxWidth: 2048
  maxHeight: 2048
  jpegQuality: 0.95
  resampleFilter: "LANCZOS"
content:
  autoPurge: true
cache:
  pathCacheSize: 20000
debugInfo:
  logFolder: "debuginfo"
  logFileSize: "5MB"
  logEnabled: true
  logPattern: "%d{HH:mm:ss.SSS} [%meshName] %-5level [%thread] [%file:%line] - %msg%n"

General Settings

Configuration Type Default Description

updateCheck

Flag

true

An update check to the Gentics Mesh update server will be invoked during startup if this flag is set to true.

defaultLanguage

String

en

Default language which serves as a fallback when no language has been specified within a request.

verticles

List

-

List of Vert.x java verticle classes which will be loaded during startup.

tempDirectory

Path

data/tmp

Path to the main temporary filesystem directory.

languagesFilePath

Path

-

Optional path to a JSON file containing additional languages.

startInReadOnly

Flag

false

If true, Gentics Mesh will be started in read only mode.

Example for custom languages file:

{
    "sq-KS": {
        "name": "Albanian (Kosovo)",
        "nativeName": "Shqip (Kosovo)"
    }
}

HTTPS/SSL

To enable HTTPS you have to specify the server key and the server certificate within the configuration.

For testing purposes you may want to create a self signed certificate like this:

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 90 -nodes

Server Options

Configuration Type Default Description

httpServer.port

Number

8080

HTTP Port number.

httpServer.host

String

0.0.0.0

Host to bind mesh to

httpServer.ssl

Boolean

false

Enable or disable SSL support.

httpServer.corsAllowedOriginPattern

RegEx

-

Regex which will validate the origin CORS header.

httpServer.scorsAllowCredentials

Boolean

false

Enable CORS credential support.

httpServer.enableCors

Boolean

false

Enable CORS support.

httpServer.certPath

Path

-

SSL certificate path.

httpServer.keyPath

Path

-

SSL key path.

httpServer.verticleAmount

Number

2 * CPU Cores

Amount of rest API verticles to be deployed.

Cluster Options

Configuration Type Default Description

cluster.enabled

Path

false

This setting is optional and can be used to configure the network which the cluster daemons bind to. Gentics Mesh will try to determine the network automatically if no setting has been provided. The value of this setting will currently also be used to connect other instances to the configured instance. So make sure that the IP/Host can be reached from other potential instances in your network.

cluster.networkHost

String

-

Host which will be used to bind clustering related ports

cluster.clusterName

String

-

Name of the cluster which will be used to group multiple instances together. The setting is required when clustering is enabled. It can also be used to form a new cluster next to an existing cluster. Only instances with the same clusterName will be able to find eachother.

cluster.vertxPort

Number

0 (random)

The vertxPort setting is used by the Vert.x eventbus message service. By default vert.x will choose any free port and utilize it for the service.

nodeName

String

-

The node name is used to identify the instance in the cluster. The name must be unique to a single instance and should not be changed.

Storage Options

By default all specified directories are relative to the installation directory.

Configuration Type Default Description

storage.directory

Path

data/graphdb

Path to the graph database storage location.

storage.backupDirectory

Path

data/backup

Backup directory.

storage.exportDirectory

Path

data/export

Export directory.

storage.startServer

Boolean

false

Flag that indicates whether the graph database server component should be started. By default only an embedded graph database is used which does not start a graph server.

storage.parameters

JSON

-

Additional JSON parameters that will be passed on to the used graph database implementation.

storage.synchronizeWrites

Boolean

true

Flag which controls whether write operations/transactions should be handled synchronously.

storage.txRetryDelay

Number

10

The transaction retry delay in milliseconds which is applied when retrying failed transactions due to concurrent changes. A value of 0 will disable the delay.

OrientDB parameters

Configuration Type Default Description

ridBag.embeddedToSbtreeBonsaiThreshold

Number

2147483647

Configures the ridbag threshold for OrientDB. This setting controls how OrientDB manages the internal ridbag data structure. This setting will be ignored when run in clustered mode. See OrientDB documentation for more details.

Search Options

Configuration Type Default Description

search.url

String

http://localhost:9200

URL to the Elasticsearch server.

search.username

String

-

Username for basic authentication.

search.password

String

-

Password for basic authentication.

search.certPath

String

-

Path to the trusted server certificate (PEM format).

search.caPath

String

-

Path to the trusted CA certificate (PEM format).

search.hostnameVerification

Boolean

true

Flag to control SSL hostname verification.

search.timeout

Number

60000

Timeout for interactions with the search server.

search.startEmbedded

Boolean

true

Flag that is used to enable or disable the automatic startup and handling of the embedded Elasticsearch server.

search.embeddedArguments

String

Default JVM Arguments

Set the JVM arguments for the embedded Elasticsearch server process.

search.prefix

String

mesh-

Elasticsearch installation prefix. Multiple Gentics Mesh installations with different prefixes can utilize the same Elasticsearch server.

search.bulkLimit

Number

100

Upper size limit for bulk requests.

search.bulkLengthLimit

Number

5000000

Upper limit for the total encoded string length of the bulk requests.

search.eventBufferSize

Number

1000

Upper limit for mesh events that are to be mapped to elastic search requests.

search.bulkDebounceTime

Number

2000

The maximum amount of time in milliseconds between two bulkable requests before they are sent.

search.idleDebounceTime

Number

100

The maximum amount of time in milliseconds between two successful requests before the idle event is emitted.

search.retryInterval

Number

5000

The time in milliseconds between retries of elastic search requests in case of a failure.

search.retryLimit

Number

3

The amount of retries on a single request before the request is discarded.

search.waitForIdle

Boolean

true

If true, search endpoints wait for elasticsearch to be idle before sending a response.

search.includeBinaryFields

Boolean

true

If true, the content and metadata of binary fields will be included in the search index.

search.mappingMode

String

DYNAMIC

This setting controls the mapping mode of fields for Elasticsearch. When set to STRICT only fields which have a custom mapping will be added to Elasticsearch. Mode DYNAMIC will automatically use the Gentics Mesh default mappings which can be supplemented with custom mappings.

Upload Options

Configuration Type Default Description

upload.byteLimit

Number

262144000 (250 MB)

Upload limit in bytes.

upload.directory

Path

data/binaryFiles

Filesystem directory for uploaded binary data.

upload.tempDirectory

Path

data/tmp/file-uploads

Temporary directory for uploaded binary data. Finished files will be moved to the upload directory.

upload.parser

Boolean

true

Controls whether the upload document parser should be enabled. The parser is responsible for extracting metadata and plain text from uploads. Disabling the parser will reduce CPU and memory usage during upload processing.

upload.parserLimit

Number

40000

Controls the parser limit. The parser will stop extracting plain contents when this limit has been reached. Please note that finding all inline annotations in PDF documents requires the parser limit to be set to -1 to fully parse the document.

Security Options

Configuration Type Default Description

security.tokenExpirationTime

Number

3600 (1h)

The JWT expiration timeout in seconds.

security.keystorePath

Path

config/keystore.jceks

Path to Java keystore file.

security.keystorePassword

String

-

Password for the Java keystore file.

security.algorithm

String

HS256

Hashing algorithm used to sign, verify and generate tokens.

security.enableAnonymousAccess

Boolean

true

Flag to be used to enable the anonymous access feature.

Monitoring Options

Configuration Type Default Description

monitoring.host

String

127.0.0.1

Configure the monitoring HTTP server host to bind to.

monitoring.port

Number

8081

Configure the monitoring HTTP server port.

monitoring.enabled

String

true

Enable or disable the monitoring system.

monitoring.jvmMetricsEnabled

String

true

Enable or disable the measuring of JVM metrics.

Image Options

Configuration Type Default Description

image.maxWidth

Number

2048

The maximum allowed image resize width. Resizing is a memory intensive operation and thus this limit can help avoid memory issues.

image.maxHeight

Number

2048

The maximum allowed image resize height. Resizing is a memory intensive operation and thus this limit can help avoid memory issues.

image.jpegQuality

Number

0.95

Configure the quality of the output of JPEG images. Must be a value between inclusive 0 and inclusive 1.

image.resampleFilter

String

LANCZOS

Configure the filter that is used when resizing images.

Filters:

  • UNDEFINED - Undefined interpolation, filter method will use default filter.

  • POINT - Point interpolation (also known as "nearest neighbour"). Very fast, but low quality

  • BOX - Box interpolation. Fast, but low quality.

  • TRIANGLE - Triangle interpolation (also known as "linear" or "bilinear"). Quite fast, with acceptable quality

  • HERMITE - Hermite interpolation.

  • HANNING - Hanning interpolation.

  • HAMMING - Hamming interpolation.

  • BLACKMAN - Blackman interpolation..

  • GAUSSIAN - Gaussian interpolation.

  • QUADRATIC - Quadratic interpolation.

  • CUBIC - Cubic interpolation.

  • CATROM - Catrom interpolation.

  • MITCHELL - Mitchell interpolation. High quality.

  • LANCZOS - Lanczos interpolation. High quality.

  • BLACKMAN_BESSEL - Blackman-Bessel interpolation. High quality.

  • BLACKMAN_SINC - Blackman-Sinc interpolation. High quality.

Cache Options

Configuration Type Default Description

pathCacheSize

Flag

20_000

Set the maximum size of the path cache. A value of 0 will disable the cache.

Additionally it is possible to tweak the underlying OrientDB cache settings.

Debug Information Options

Configuration Type Default Description

logEnabled

Flag

true

Enables the debug info log.

logFolder

String

debuginfo

The path of the folder where the debug info log is stored.

logFileSize

String

5MB

The maximum file size of a single log file.

logPattern

String

%d{HH:mm:ss.SSS} [%meshName] %-5level [%thread] [%file:%line] - %msg%n

The pattern used for each log line.

Memory Settings

Memory settings can be defined using the JAVA_TOOL_OPTIONS environment variable.

Setting Description

-Xmx

Maximum heap size of the Gentics Mesh Java process

-Xms

Initial heap size of the Gentics Mesh Java process

-XX:MaxDirectMemorySize

Maximum direct memory limit. Direct memory is mostly used to buffer transactions of the Graph database

-Dstorage.diskCache.bufferSize

Disk buffer size in megabytes used for the Graph database

Recommendations

The following numbers serve the purpose to roughly estimate the memory requirements for different sized projects.

Node Count Memory Setting

0 to 100

-Xms128m -Xmx128m -XX:MaxDirectMemorySize=128m -Dstorage.diskCache.bufferSize=128

100 to 1_000

-Xms512m -Xmx512m -XX:MaxDirectMemorySize=256m -Dstorage.diskCache.bufferSize=256

1_000 to 10_000

-Xms786m -Xmx786m -XX:MaxDirectMemorySize=384m -Dstorage.diskCache.bufferSize=384

10_000 to 100_000

-Xms1250m -Xmx1250m -XX:MaxDirectMemorySize=512m -Dstorage.diskCache.bufferSize=512

100_000 to 1_000_000

-Xms2500m -Xmx2500m -XX:MaxDirectMemorySize=1024m -Dstorage.diskCache.bufferSize=1024

Backup & Recovery

There are currently three components which can be included in a backup:

  • Graph Database - The graph database contains the main content of Gentics Mesh. The DB can be backed up on demand via /api/v2/admin/graphdb/backup endpoint or via the OrientDB backup job using automatic-backup.json. This will automatically create a full backup. Note that both backup processes will block the application. The graph database backup process will write a backup file to the configured backup location (see [Storage Location]).

  • Binary files - Binaries are currently stored in the filesystem and need to be backed up separately data/binaryFiles)

  • Elasticsearch Index - Optionally you can also backup the Elasticsearch index. The index can also be recreated anytime using the POST /api/v2/search/sync endpoint.

The POST /api/v2/admin/graphdb/restore endpoint can be used to restore created backups. The endpoint will utilize the latest backup found in the backup directory.

Invoking the backup/restore endpoints will block all execution and request processing.
The restore operation can’t be executed on Mesh instances which have clustering enabled.

If you already run Gentics Mesh in a cluster you can start a dedicated backup instance which can run the backup process without interference of the other nodes.

Take a look at our docker-compose example for a documented setup.

Import & Export

The POST /api/v2/admin/graphdb/export and POST /api/v2/admin/graphdb/import endpoints can be used to generate Graph Database export files which are gzipped json files. A large database can be exported and reimported again to reduce the sparse file size.

Debug Information

The debug info endpoint (GET /api/v2/admin/debuginfo) starts a zip download containing various useful data about the system.

The documentation below lists all files that are included in the zip.

Per default everything except the consistency check is included in the zip. You can use the ?include query parameter to include or exclude specific parts. For example /api/v2/admin/debuginfo?include=-backup,consistencyCheck will exclude the database backup and include the consistency checks.

Active Config

Query name: activeConfig

The effective configuration that is currently used in the system. This includes overrides by command line argument and environment variables.

Binary Disk Usage

Query name: binaryDiskUsage

The total file size of all stored binaries and cached images.

Configurations

Query name: config

The following files from the config folder:

  • mesh.yml

  • hazelcast.xml

  • logback.xml

  • default-distributed-db-config.xml

  • orientdb-server-config.xml

Consistency Check

Query name: consistencyCheck

Performs a consistency check and includes the result.

Database Backup

Query name: backup

Including this will cause the database to be in read only mode for the duration of the backup.

Performs a Graph database backup and includes the files.

Entities

Query name: entities

Includes the following entities as json:

  • All jobs

  • All Schemas

  • All Microschemas

  • All Projects

  • All Branches

Log

Query name: log

Includes the latest debug log output of Gentics Mesh. Check the debug info options for more options.

Migration Status

Query name: migrationStatus

Includes the schema migration status and mircoschema migration status for every branch of every project.

Plugins

Query name: plugins

Status

Query name: status

System Information

Query name: systemInfo

Contains the following informations about the system:

  • System load average

  • JVM memory usage

  • JVM arguments

  • Disk space usage (of the file system where Gentics Mesh is running)

Thread Dump

Query name: threadDump

A dump of all threads including all stack traces.

Read Only Mode

Gentics Mesh can be put into read only mode. In this mode, all requests that would change data (create, update, delete) are not allowed and return a `405ยด status code instead.

This is useful in cluster situations when having instances as replicas or when performing rolling updates.

Activating Read Only Mode

Read only mode can be activated in one of the following ways:

  • Setting the entry startInReadOnly to true in the configuration file before starting will start Gentics Mesh in read only mode.

  • Setting the environment variable MESH_START_IN_READ_ONLY to true before starting will start Gentics Mesh in read only mode.

  • Using the REST API. Changing read only mode in this way will take immediate effect.

Update handling

Updating Gentics Mesh is very simple. You stop the current instance and start it again using the new version. A process is invoked which will check whether any automatic changes need to be applied.

Downgrading

Downgrading is possible but not recommended. You can however downgrade your Gentics Mesh instance if the database revision hash of the current database matches up with the revision which is required by the version which is being started. You can check your current database revision via the /api/v2 endpoint.

Database Revisions

This list contains an overview over Gentics Mesh releases and the their database revisions. The database revision is different if the used Graph Database version was updated or if the database structure was altered due to an automatic change.

Version Database revision

1.3.0

55e55717

1.3.1

55e55717

Database Consistency

It is possible to verify the database integrity via the GET /api/v2/admin/consistency/check endpoint.

The response contains information about the found inconsistencies and whether they have a repair action.

{
  "outputTruncated" : false,
  "result" : "INCONSISTENT",
  "repairCount" : { },
  "inconsistencies" : [ {
    "description" : "A dangling field container has been found.",
    "severity" : "LOW",
    "elementUuid" : "c5ac82fa1a9c43b6ac82fa1a9ca3b61c",
    "repaired" : false,
    "repairAction" : "DELETE"
  } ]
}

The POST /api/v2/admin/consistency/repair endpoint can be used to invoke a check and repair of repairable inconsistencies.

The repaired property will be set to true if the inconsistency could be fixed.

{
  "outputTruncated" : false,
  "result" : "INCONSISTENT",
  "repairCount" : { },
  "inconsistencies" : [ {
    "description" : "A dangling field container has been found.",
    "severity" : "LOW",
    "elementUuid" : "c5ac82fa1a9c43b6ac82fa1a9ca3b61c",
    "repaired" : true,
    "repairAction" : "DELETE"
  } ]
}

Filesystem support

The filesystem ZFS (ZFS on Linux) does currently not support Direct IO on Linux.

When using ZFS it is thus required to turn off direct IO usage of OrientDB. Please use the -Dstorage.wal.allowDirectIO=false setting in this case.

The direct IO support will be included in ZFS 0.8

License