cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Reload Neo4j using Systemd

When running neo4j as a systemd service is there any way to reload the configuration and certificates in particular without a full restart of the db?

Here is the documentation (little sparse?):

https://neo4j.com/docs/operations-manual/current/installation/linux/systemd/

And here is my config:

[Unit]
Description=a graph database
Documentation=https://neo4j.com/docs/operations-manual/3.4
After=network.target

[Service]
User=neo4j
Group=neo4j
Type=forking
ExecStart=/usr/local/bin/neo4j start
ExecReload=/usr/local/bin/neo4j restart
TimeoutSec=120
KillMode=process
Restart=on-failure
RestartSec=10
RuntimeDirectory=neo4j
LimitMEMLOCK=infinity
LimitNOFILE=60000
SecureBits=keep-caps
NoNewPrivileges=yes
Environment=NEO4J_HOME=/opt/neo4j

[Install]
WantedBy=multi-user.target

Any thoughts on how to reload certificates in neo4j without a full restart? As this triggers an outage and a page cache reload.

1 ACCEPTED SOLUTION

Hi Mike,

I'm assuming that you still need to bounce the server to get the new certs in.
If this is a cluster, you can bounce one server with systemd at a time, and not cause a complete outage. This is also how you would upgrade neo4j without the cluster being unavailable. See: https://neo4j.com/docs/operations-manual/4.0/upgrade/causal-cluster/#cc-upgrade-rolling

View solution in original post

3 REPLIES 3

Unfortunately, no. Reloading certificates and configuration requires a full restart.

There are a handful of neo4j dynamic configuration options that can be changed while the server runs, but many system-critical ones are not included in the dynamic set.

https://neo4j.com/docs/operations-manual/current/configuration/dynamic-settings/

This topic came up again as we're looking at clustering Neo4j 4.1.1 - from reading the updated article:

do we need to actually restart the database or is the certificate periodically reloaded without us restarting neo4j's systemd process? Such that all the cronjob or other orchestrator needs to do is update the certificate?

Hi Mike,

I'm assuming that you still need to bounce the server to get the new certs in.
If this is a cluster, you can bounce one server with systemd at a time, and not cause a complete outage. This is also how you would upgrade neo4j without the cluster being unavailable. See: https://neo4j.com/docs/operations-manual/4.0/upgrade/causal-cluster/#cc-upgrade-rolling