Prerequisites
Every Sophora Server (except for Staging Servers) requires its own Postgres-Database. Currently this must be at least version 15.3. In a production environment we recommend one PostgreSQL server per Sophora Server.
For testing you can create multiple databases on the same (single) PostgreSQL server. We don’t recommend this setup in production because of the single point of failure.
Please refer to your system administrator or the PostgreSQL documentation in order to configure a server and a database properly.
PostgreSQL Connection Configuration
Add the following configuration to your sophora.properties
to configure the postgres connection:
Property | Description |
---|---|
sophora.persistence.postgres.hostname | Specifies the host name of the machine on which the PostgreSQL server is running |
sophora.persistence.postgres.port | Specifies the port of the machine on which the PostgreSQL server is running |
sophora.persistence.postgres.username | PostgreSQL username with read and write permissions |
sophora.persistence.postgres.password | PostgreSQL password |
sophora.persistence.postgres.database | Existing database in PostgreSQL for Sophora |
The PostgreSQL connections are held in a connection pool. The following optional properties can be used to configure the connection pool. If not specified, the properties will take the default values from HikariCP, a Java library for JDBC connection pool.
Property | Description | Default Value | Min. Value |
---|---|---|---|
sophora.persistence.postgres.maxPoolSize | The maximum number of idle and in-use connections in the pool. | 10 | 1 |
sophora.persistence.postgres.minIdleConnections | If the number of idle connections is lower than this value, it will be restored to this value with the best effort. | - | 0 |
sophora.persistence.postgres.connectionTimeoutMs | The maximum number of time in milliseconds that the Sophora Server will wait for a connection from the pool. | 30000 (30s) | 250 |
sophora.persistence.postgres.idleTimeoutMs | The maximum number of time in milliseconds that a connection is allowed to sit idle in the pool. | 10000 (10s) | 0 |
sophora.persistence.postgres.validationTimeoutMs | The maximum number of time in milliseconds that the pool will wait for a connection to be validated as alive. | 5000 (5s) | 250 |
Version Store Configuration
Add the following configuration to your sophora.properties to configure the Version Store:
Property | Description | Default |
---|---|---|
sophora.versionstore.declutter.cron | Cron expression to control when the Version Store decluttering job starts to remove old versions. | 0 0 2 * * ? |
sophora.versionstore.maxVersionsToKeep | Maximum versions to keep in the Version Store per document before they are marked for deletion. | - |
sophora.versionstore.maxAgeInDays | Maximum age in days for versions before they are marked for deletion. | - |
sophora.versionstore.byNodeType.[label].nodeType | Sets the node type for the [label]. Required for all properties starting with sophora.versionstore.byNodeType. All properties following this schema only configure this node type. | - |
sophora.versionstore.byNodeType.[label].maxVersionsToKeep | Maximum versions to keep in the Version Store per document of a specific node type before they are marked for deletion. | - |
sophora.versionstore.byNodeType.[label].maxAgeInDays | Maximum age in days for versions of a specific node type before they are marked for deletion. | - |