Skip to main content


Worker Jobs: UpdateContacts it never ends

Hello , @Friendica Support
It's been more than 2 months since UpdateContacts the one highlighted in red it doesn't end , can you tell me how i can remove it?

Thanks

in reply to Anomaly

@Anomaly if you have console/terminal access, run cd your-friendica-directory bin/console.php worker it runs your cron jobs, and gets your workers to complete jobs in the queue, it may help
in reply to pasjrwoctx👽

Hi @pasjrwoctx👽 , thanks
I can't find any entries related to worker

bin/console.php


Usage: bin/console [--version] [-h|--help|-?] <command> [<args>] [-v]

Commands:
    addon                  Addon management
    cache                  Manage node cache
    clearavatarcache       Clear the file based avatar cache
    config                 Edit site config
    contact                Contact management
    createdoxygen          Generate Doxygen headers
    dbstructure            Do database updates
    docbloxerrorchecker    Check the file tree for DocBlox errors
    extract                Generate translation string file for the Friendica project (deprecated)
    globalcommunityblock   Block remote profile from interacting with this node
    globalcommunitysilence Silence a profile from the global community page
    archivecontact         Archive a contact when you know that it isn't existing anymore
    help                   Show help about a command, e.g (bin/console help config)
    autoinstall            Starts automatic installation of friendica based on values from htconfig.php
    lock                   Edit site locks
    maintenance            Set maintenance mode for this node
    movetoavatarcache      Move cached avatars to the file based avatar cache
    mergecontacts          Merge duplicated contact entries
    user                   User management
    php2po                 Generate a messages.po file from a strings.php file
    po2php                 Generate a strings.php file from a messages.po file
    typo                   Checks for parse errors in Friendica files
    postupdate             Execute pending post update scripts (can last days)
    relocate               Update node base URL
    serverblock            Manage blocked servers
    storage                Manage storage backend
    relay                  Manage ActivityPub relay servers

Options:
    -h|--help|-? Show help information
    -v           Show more debug information.

in reply to Anomaly

@Anomaly try bin/worker.php instead, you might be on an older version than what uses bin/console.php worker
in reply to pasjrwoctx👽

@pasjrwoctx👽
I am using the latest version
Version
Friendica 'Interrupted Fern' 2024.12 - 1576

I think because i use Daemon as a Systemd Service , no cron jobs
in reply to Anomaly

@Anomaly then if you open terminal on your server, and cd to your friendica dir, bin/worker.php it should run the worker, and one other thing you can try, is go to myphpadmin open your database for friendica, and in the sql tab enter DELETE FROM `workerqueue` WHERE `done` = 1; which will clear all jobs completed, the task may be completed, but not cleared out of the database table. other than that maybe @hypolite can help maybe better
in reply to pasjrwoctx👽

Thanks so much for the help @pasjrwoctx👽

~/friendica$ bin/daemon.php status
Daemon process 1120 is running.

Mysql
DELETE FROM workerqueue WHERE done = 1;
Query OK, 151 rows affected (0.004 sec)

For now UpdateContacts it's still there
Maybe @Hypolite Petovan will give some suggestions

in reply to Anomaly

@Anomaly @Hypolite Petovan @pasjrwoctx👽 if you turn on debug logs, are there related logs? Especially after running worker. php?

If not - you can probably purge the item from the db safely.

Friendica Support reshared this.

in reply to silverwizard

@silverwizard @Hypolite Petovan @pasjrwoctx👽
I killed the process and restarted it
systemctl status friendica-daemon.service
● friendica-daemon.service - Friendica daemon
     Loaded: loaded (/etc/systemd/system/friendica-daemon.service; enabled; preset: enabled)
     Active: active (running) since Sun 2025-03-09 19:13:33 CET; 21min ago
   Main PID: 1105 (php)
      Tasks: 1 (limit: 19101)
     Memory: 71.1M (peak: 294.3M)
        CPU: 38.343s
     CGroup: /system.slice/friendica-daemon.service
             └─1105 /usr/bin/php ./bin/daemon.php start

I turn on debug logs , these are all the messages
This entry was edited (17 hours ago)

Friendica Support reshared this.

in reply to Anomaly

@Anomaly also try, Admin/Site/Worker Maximum load average=50, Maximum number of parallel workers=20, Maximum load for workers=150, Worker defer limit=15, Worker fetch limit=25, it may help as well as double check your Database Lock Wait Timeouts, check the Friendica log files for any error messages related to lock wait timeouts, sorry I cant offer more, im a little limited on my knowledge, just sharing everything I know, because I have dealt with some of these issues, y

Friendica Support reshared this.

in reply to pasjrwoctx👽

@pasjrwoctx👽
I will follow your suggestions, you surely know many things more than me 😊 , thx

Friendica Support reshared this.

in reply to Anomaly

@Anomaly Deferred tasks aren't currently running. They failed during they initial run, which placed them in this wait list with a next try date in the future. From your screenshot it appears that the task creation date and the next try date are pretty close to each other, so it must only have failed a few times at most.

Running either the worker or the daemon manually will not clear deferred tasks which next try date have not been reached yet. There's an incremental back off system that increases the delay before the next try after each new failure. Once the task succeeds, the task will clear from the deferred list.

Friendica Support reshared this.

in reply to Hypolite Petovan

@Hypolite Petovan
yes I thought this, but why has this entry been in the list for 2 months? All entries are successfully completed .
I have no problems with friendica, if this entry does not cause problems,can be on the list.
I'm not very experienced with friendica, so I'm asking
This entry was edited (16 hours ago)