Tweak Seafile Controller?

My Pro server “crashed” yesterday with “out of memory” error. Basically only a hard turn off helped to make it work again.

Reason were mutiple spawns of Java/Elasticsearch. Not sure why this happened but it also happens during a reboot now. Maybe the elasticsearch PID file is not created quickly enough, so seafile-controller tries to launch it again?

[07/18/20 12:04:08] seafile-controller.c(174): starting ccnet-server ...
[07/18/20 12:04:08] seafile-controller.c(94): spawn_process: ccnet-server -F /home/seafile/conf -c /home/seafile/ccnet -f /home/seafile/logs/ccnet.log -d -L /home/seafile -P /home/seafile/pids/ccnet.pid
[07/18/20 12:04:08] seafile-controller.c(109): spawned ccnet-server, pid 2278
[07/18/20 12:04:08] seafile-controller.c(208): starting seaf-server ...
[07/18/20 12:04:08] seafile-controller.c(94): spawn_process: seaf-server -F /home/seafile/conf -c /home/seafile/ccnet -d /home/seafile/seafile-data -l /home/seafile/logs/seafile.log -P /home/seafile/pids/seaf-server.pid -p /home/seafile/seafile-pro-server-7.1.5/runtime -f -L /home/seafile
[07/18/20 12:04:08] seafile-controller.c(109): spawned seaf-server, pid 2279
[07/18/20 12:04:18] seafile-controller.c(555): pid file /home/seafile/pids/seafevents.pid does not exist
[07/18/20 12:04:18] seafile-controller.c(591): seafevents need restart...
[07/18/20 12:04:18] seafile-controller.c(94): spawn_process: /usr/bin/python3 -m seafevents.main --config-file /home/seafile/conf/seafevents.conf --logfile /home/seafile/logs/seafevents.log -P /home/seafile/pids/seafevents.pid
[07/18/20 12:04:18] seafile-controller.c(109): spawned /usr/bin/python3, pid 2324
[07/18/20 12:04:18] seafile-controller.c(555): pid file /home/seafile/pids/seafdav.pid does not exist
[07/18/20 12:04:18] seafile-controller.c(597): seafdav need restart...
[07/18/20 12:04:18] seafile-controller.c(94): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /home/seafile/logs/seafdav.log --pid /home/seafile/pids/seafdav.pid --port 8080 --host 127.0.0.1
[07/18/20 12:04:18] seafile-controller.c(109): spawned /usr/bin/python3, pid 2325
[07/18/20 12:04:18] seafile-controller.c(555): pid file /home/seafile/pids/elasticsearch.pid does not exist
[07/18/20 12:04:18] seafile-controller.c(603): elasticsearch need restart...
[07/18/20 12:04:18] seafile-controller.c(94): spawn_process: /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch -Epath.logs=/home/seafile/logs -Epath.data=/home/seafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /home/seafile/pids/elasticsearch.pid
[07/18/20 12:04:18] seafile-controller.c(109): spawned /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch, pid 2326
[07/18/20 12:04:28] seafile-controller.c(555): pid file /home/seafile/pids/elasticsearch.pid does not exist
[07/18/20 12:04:28] seafile-controller.c(603): elasticsearch need restart...
[07/18/20 12:04:28] seafile-controller.c(94): spawn_process: /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch -Epath.logs=/home/seafile/logs -Epath.data=/home/seafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /home/seafile/pids/elasticsearch.pid
[07/18/20 12:04:28] seafile-controller.c(109): spawned /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch, pid 2372
[07/18/20 12:04:38] seafile-controller.c(555): pid file /home/seafile/pids/elasticsearch.pid does not exist
[07/18/20 12:04:38] seafile-controller.c(603): elasticsearch need restart...
[07/18/20 12:04:38] seafile-controller.c(94): spawn_process: /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch -Epath.logs=/home/seafile/logs -Epath.data=/home/seafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /home/seafile/pids/elasticsearch.pid
[07/18/20 12:04:38] seafile-controller.c(109): spawned /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch, pid 2441
[07/18/20 12:04:58] seafile-controller.c(555): pid file /home/seafile/pids/elasticsearch.pid does not exist
[07/18/20 12:04:58] seafile-controller.c(603): elasticsearch need restart...
[07/18/20 12:04:58] seafile-controller.c(94): spawn_process: /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch -Epath.logs=/home/seafile/logs -Epath.data=/home/seafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /home/seafile/pids/elasticsearch.pid
[07/18/20 12:04:58] seafile-controller.c(109): spawned /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch, pid 2505
[07/18/20 12:05:08] seafile-controller.c(555): pid file /home/seafile/pids/elasticsearch.pid does not exist
[07/18/20 12:05:08] seafile-controller.c(603): elasticsearch need restart...
[07/18/20 12:05:08] seafile-controller.c(94): spawn_process: /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch -Epath.logs=/home/seafile/logs -Epath.data=/home/seafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /home/seafile/pids/elasticsearch.pid
[07/18/20 12:05:08] seafile-controller.c(109): spawned /home/seafile/seafile-pro-server-7.1.5/pro/elasticsearch/bin/elasticsearch, pid 2560

Any help w/o disabling search?

check if permissions in your directories/files are correct
this often happens when you accidently start it as root

Thanks, but nothing with root here. Permissions are fine. Never had issues with this setup.
During this startup above I was just able to execute a “killall java” and this immediately fixed it. So now ES runs with PID 2560.

Not sure what’s going on here.

check the ES log
I think we had a similar behaviour in our env - assigned memory been too small or something like