Using supervisord to manage Neo4j process
In general, running the neo4j process directly is the most common way to start and stop the neo4j server. However, if you use supervisord to manage processes, this has worked for others.
Things to keep in mind:
supervisord
can only manage non-daemonized processes, so you will need to use neo4j console
instead of neo4j start
.
You need to configure the correct "stopsignal" in the supervisord configuration so as not to cause issues with the cluster on unexpected restart.
In particular, set:
stopsignal=SIGTERM
Here is an example supervisord
configuration that has worked in production:
[program:neo4j]
command=/usr/local/neo4j-enterprise/bin/neo4j console
user=neo4j
autostart=true
autorestart=unexpected
startsecs=30
startretries=999
priorities=90
exitcodes=0,1,2
stopsignal=SIGTERM
stopasgroup=true
killasgroup=true
redirect_stderr=true
stdout_logfile=/usr/local/neo4j-enterprise/data/log/neo4j.out
stdout_logfile_backups=10
stderr_capture_maxbytes=20MB
Is this page helpful?