Skip to main content


!Friendica Support I realized that some of my comments to a post on a Mastodon instance were not being delivered, so I checked the worker queue. My queue is filled up, there are items in there that go back up to 4 weeks. I am not sure if this might be the cause for today's issue because I could not find anything in the queue relating to the instance where my comments were not delievered to.

I use a shared hosting service with crontab. How can I resolve the issue(s)?
in reply to Rick G

@Rick G enable the log in debug (this will write lots of data, so make sure to have enough space), then share the lines with "worker" in them. Also make sure the worker is started every 2 minutes or so, also share the config for worker from /admin.
in reply to Rick G

@Rick G in the config you can add this in the system section to get a bit more information, make sure to obey the php formatting.

//              ; worker debug aktiv
                'worker_debug' => 'true',
//              Woker JPM (Jobs per Minute) in log
                'worker_jpm' => 'true',


I think the first is debug mode for worker problems, surely @Michael Vogel told me that some time ago, for the jpm it is nice to see how many jobs your worker does per minute.

It will clutter the log even more, so take care of the log size, on my hosts I have logrotate set to prevent the HDD filling up.
in reply to Rick G

Experienced a similar issue. Our of curiosity how many Message Queues you see in the admin area?

Friendica Support reshared this.

in reply to Tio

@Tio it says "177 - 50715". I don't even know what that means
@Tio

Friendica Support reshared this.

in reply to Rick G

Oh you're like me kinda...it means, from what I can tell, that friendica needs to do 50715 more processes. They are on the to-do list. So how I fixed the delay is to move from CRON to DAEMON. @Hank G ☑️ made a simple tutorial about it here - https://nequalsonelifestyle.com/2022/08/04/setting-up-friendica-daemon-systemd-service/

That cut the processes in the "to-do" by more than half and then my Friendica started to work again well. There is also a Matrix chat if you want to join for more direct help https://matrix.to/#/#friendi.ca:matrix.org

Friendica Support reshared this.

in reply to Tio

@Tio @Hank G ☑️ @Rick G yes, daemon is nicer, specially with uberapace you can use it. Just make sure to add it to crontab with @ reboot to start it again if the host ever is rebooted. You can also only disable the worker entry in crontab and try if the deamon works better, but make sure to set it up correctly.

Friendica Support reshared this.

in reply to utzer [Friendica]

@utzer ~Friendica~ @Hank G ☑️ @Tio can I follow the guide that was posted earlier on Uberspace? I'm unsure and not too familiar with command line but willing to give it a try if it helps and if I can figure out how to do it

Friendica Support reshared this.

in reply to Rick G

@Rick G don't bother the above linked tutorial does not apply to you at all.
1. Stop the worker (remove the line from cron)
2. Configure the pid to be in your home folder in the Friendica config file and then start the daemon.
3. Check the daemon is running by the status command.

To start the daemon go to Friendica base folder and run "bin/daemon.php start". If you replace start with status you can check it is running.
This entry was edited (1 year ago)

Friendica Support reshared this.

in reply to utzer [Friendica]

@utzer ~Friendica~ Good morning. I tried to do what you wrote, but get a bunch of php notices after starting the daemon, see screenshot. I configured the pid file to be in the html folder, is that right?

Friendica Support reshared this.

in reply to Rick G

@Rick G I would not put anything in the html folder that is not needed to be accessible from web, so better is to put it in /home/rick6/friendica_worker.pid or some sub folder of your home folder.

You should report PHP notices here:
https://github.com/friendica/friendica/issues/11632

If you got to https://github.com/friendica/friendica/issues in the top you find the link for errors, warnings and notices.

Did you add the path to the pid file in the config?
In the system section it you need something like this:
'pidfile' => '/home/rick6/friendica_daemon.pid',

Friendica Support reshared this.

in reply to utzer [Friendica]

@utzer ~Friendica~ Ok, now I finally got what I needed to do. Damon is working and no more php notices. How do I get the daemon to start automatically after reboot or crash?

Friendica Support reshared this.

in reply to Rick G

@Rick G you can use cron with @ reboot, see here: https://phoenixnap.com/kb/crontab-reboot

To test this I would stop the daemon, and add a cron line that will start the damon in 5 minutes or so, to see this is working, I mean to check the path and so on, when that works remove the 5 numbers or stars in the front and put the @reboot there.
See also here: https://crontab.guru/

Friendica Support reshared this.

in reply to utzer [Friendica]

@utzer ~Friendica~ Looking good! I think it is working. Thank you so much for your support

Friendica Support reshared this.

in reply to Rick G

@Rick G I would be interested in feedback regarding load/complaints from Uberspace.

Happy it works!

Friendica Support reshared this.

in reply to Rick G

The link I gave you has all of the instructions you need.

Friendica Support reshared this.

in reply to Tio

@Tio @Hank G ☑️ @utzer ~Friendica~ Alright, moving from Cron to daemon cut the number of tasks from over 50k down to around 25k in a matter of hours. Looking good so far

Friendica Support reshared this.

in reply to Rick G

@Rick G the rest might take longer, priority 40 or 50 can take some days or weeks.


@Tio @Hank G ☑️

Friendica Support reshared this.

in reply to utzer [Friendica]

@utzer ~Friendica~ Workers are down to under 50. Also, Friendica never went into unavailable mode as it did earlier from time to time

Friendica Support reshared this.

Unknown parent

@Hank G ☑️ cron @reboot should work on systems having cron. However this case here is a hoster with full cli access, but no root access and I am not sure they offer systemd. @Rick G

Friendica Support reshared this.