Hello I noticed that when I made a new post on my new Friendica instance, the worker in the background was very slow to run the notifier task (I assume this is to do with how it spreads messages through the various protocols to different servers on the Fediverse).
I found this was run by a cron job, and doing the below seems to have solved the issue.
I wanted to write it up here in case anyone else runs into the same issue.
# Use Yunohost's shell to travel to /var/www/friendica,
# Friendica's app directory, as `sudo cd` is disabled.
$ sudo yunohost app shell friendica
# Once the shell has loaded, `cd` into the directory,
# open the latest php and run worker.php
$ cd /var/www/friendica; /usr/bin/php bin/worker.php
# Make a new crontab file. This is saved as a temp file
# in /tmp but is also copied to /var/spool/cron/crontabs
# and /etc/cron.d/
$ crontab -e
# Select your text editor of choice (I like nano), and then
# add at the bottom of the file:
*/10 * * * * /var/www/friendica; /usr/bin/php bin/worker.php
Then save with CTRL+O and exit with CTRL+X.
According to these instructions, this will make the worker run at most every 10 minutes.
Here is an explanation of how a crontab file is structured (what all those asterisks mean).
Before, the notifier tasks were going every 30-45 minutes. Now they go every ~5 minutes.
I think Eolab said in their thread about the ā//ā issue that they had to set up a manual cron job after updating to 2023.12, just like before. I had to do the same, and although Friendica mostly works as expected now (yay!), Iām still having some unexpected problems with getting notifications to be sent to others when I @-mention them.
If you still want me to test things, let me know what I need to do
While it makes pre-upgrade backup make full backup just to make sure, especially if it would technically downgrade the version youāre running (dunno if thatās the case).
It looks like the URL has changed, and now /tree/daemon is now /tree/Daemon.
I tried it with that, forced with -F, and the update went perfectly.
Edit: Made a test post, and it got processed by the daemon in under 3 minutes. The worker queue still says it has processes pending, though, so Iām not sure if thatās intendedā¦?
Iāve turned the cron job back on for now, as it seems to work well alongside the daemon process.
Right.
I upgraded Friendica to the latest version using the āSystem updateā feature in the Yunohost web admin panel, and now Iām getting error emails saying that the Friendica service did not start.
journalctl:
Feb 22 19:53:27 systemd[1]: Started Friendica daemon.
Feb 22 19:53:28 systemd[1]: friendica.service: Succeeded.
Feb 22 19:53:28 systemd[1]: friendica.service: Scheduled restart job, restart counter is at 1.
Feb 22 19:53:28 systemd[1]: Stopped Friendica daemon.
Feb 22 19:53:28 systemd[1]: Started Friendica daemon.
Feb 22 19:53:28 systemd[1]: friendica.service: Succeeded.
Feb 22 19:53:28 systemd[1]: friendica.service: Scheduled restart job, restart counter is at 2.
Feb 22 19:53:28 systemd[1]: Stopped Friendica daemon.
Feb 22 19:53:28 systemd[1]: Started Friendica daemon.
Feb 22 19:53:28 systemd[1]: friendica.service: Succeeded.
Feb 22 19:53:29 systemd[1]: friendica.service: Scheduled restart job, restart counter is at 3.
Feb 22 19:53:29 systemd[1]: Stopped Friendica daemon.
Feb 22 19:53:29 systemd[1]: Started Friendica daemon.
Feb 22 19:53:29 systemd[1]: friendica.service: Succeeded.
Feb 22 19:53:29 systemd[1]: friendica.service: Scheduled restart job, restart counter is at 4.
Feb 22 19:53:29 systemd[1]: Stopped Friendica daemon.
Feb 22 19:53:29 systemd[1]: Started Friendica daemon.
Feb 22 19:53:29 systemd[1]: friendica.service: Succeeded.
Feb 22 19:53:30 systemd[1]: friendica.service: Scheduled restart job, restart counter is at 5.
Feb 22 19:53:30 systemd[1]: Stopped Friendica daemon.
Feb 22 19:53:30 systemd[1]: friendica.service: Start request repeated too quickly.
Feb 22 19:53:30 systemd[1]: friendica.service: Failed with result 'start-limit-hit'.
Feb 22 19:53:30 systemd[1]: Failed to start Friendica daemon.
/var/log/friendica/friendica.log:
Starting worker daemon.
Child process started with pid 1557.
Worker daemon process 1557 was killed.
Starting worker daemon.
Child process started with pid 1576.
Worker daemon process 1576 was killed.
Starting worker daemon.
Child process started with pid 1620.
Worker daemon process 1620 was killed.
The friendica-daemon service seems to be working correctly ā just not the Friendica service.
I still had the old cron job running in the background - donāt know if this had an effect? Iāve now deleted it from the /var/spool/cron/crontabs folder.
I get both friendica-daemon.service and friendica.service
Friendica seems to be working OK even with both in the list (edit: āfriendica.serviceā is not running, and shouldnāt be!), and now that I have removed the cron manually I am no longer receiving error emails.
If thereās a way just to remove friendica.service from systemd then it should all be OK.
It was in /var/spool/cron/crontabs/ ā there was a plain text file called friendica in there that I deleted with rm.
Iāve also checked in /tmp and /etc/cron.d/ and there are no other cron jobs still lurking around. I think creating crontabs with crontab -e copies the file into those three locations.
I removed the friendica.service following your steps above, and although the entry is still showing in Services (in web admin), it says it has been āUnknown since about 54 years agoā I guess if I reboot my server, it will vanish.
Edit: It doesnāt vanish. -.- Perhaps updating to a newer Yunohost version will do it?