Skip to main content


!Friendica Support The worker throws the following error and the queue is getting full and not processed. My memory_limit is 2048M, shoud I increase, I think it is a lot?
Thanks for help! vendor/guzzlehttp/psr7/src/Utils.php on line 91

Die Aufgabe ".../bin/worker.php" wurde in 40 Sekunden abgeschlossen, jedoch traten Fehler auf

sh: 1: /usr/bin/php: not found
sh: 1: /usr/bin/php: not found
sh: 1: /usr/bin/php: not found
sh: 1: /usr/bin/php: not found
sh: 1: /usr/bin/php: not found
PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 1071644704 bytes) in /.../vendor/guzzlehttp/psr7/src/Utils.php on line 91

And why blocks it to process the other jobs? I switched from php 8.3 to 8.4 and increased the memory limit to 3072M. But it wants even more now:

Die Aufgabe ".../bin/worker.php" wurde in 44 Sekunden abgeschlossen, jedoch traten Fehler auf

sh: 1: /usr/bin/php: not found
sh: 1: /usr/bin/php: not found
sh: 1: /usr/bin/php: not found
sh: 1: /usr/bin/php: not found
sh: 1: /usr/bin/php: not found
PHP Fatal error: Allowed memory size of 3221225472 bytes exhausted (tried to allocate 1742733344 bytes) in /.../vendor/guzzlehttp/psr7/src/Utils.php on line 91

@Melanie Wehowski My daemon here runs smoothly with 512 MB only. And a which php returns /usr/bin/php so it must be on your (server's) side that's weird. Have you installed php-cli as well? CLI is short for "Command-Line Interface" and is the package that you need for the daemon to run. Plus before you tinker with more options around, remember that your server's physical RAM needs to be able to store what you configure in memory_limit + the OS needs RAM for its own.

Plus if you have a single machine (server) then all other services must run on it's RAM, too. The trick here is to balance it properly out.

Ich musste den Worker Process "UpdateGserver sashanoraa.gay" aus der Worker-Datenbank löschen (habe den Server auch leider zunächst blockiert).
Nun werden die Jobs im Worker wieder ausgeführt.
@Melanie Wehowski How do you start friendica daemon? Does file /usr/bin/php exist on your system? What operating system? How did you installed PHP?

@Peter Vágner I downgraded to PHP 8.3 FPM, about the "php: not found" error I found the tip to set the php path in the config:

'config' => [
'php_path' => '/usr/bin/php82',
…,
],


I also increased the pm.max_children in the FPM settings.

In the Admin->Page Settings I set the option
"Only update contacts/servers with local data".

I tested to find out the best Worker settings...

I am currently monitoring

SELECT * FROM `workerqueue` WHERE `pid`<>0 AND `done`=0;


to find the proper worker settings.

The worker queue was about 30K Jpbs plus, now it is processing down ~28K Jobs left so far...

@Melanie Wehowski Great, I was really unsure but it looks as you have figured it out.
I am also sometimes getting memory limit errors and I suspect it's while handling some remote images.
Do you have corresponding php-imagick installed for your php version? I think that might be helpfull too.
@Melanie Wehowski @Peter Vágner Sometimes lesser it better. Let me show you mine:
$ grep worker config/local.config.php
    'worker_queues'            => '2',
    'worker_fetch_limit'       => '50',
    'worker_fastlane'          => true,
    'worker_jpm'               => true,
    'worker_debug'             => true,
$

Probably you want to have worker_debug disabled.
@Melanie Wehowski I get memory limit errors all the time.. I guess every 5 minutes or so.. don't know why.. other admins said even 256M would be enough.. I even tried 2048M.. did not help.. now using 512M... no idea what is wrong...
This entry was edited (1 month ago)
@xy.. @Melanie Wehowski Friendica sometimes attempt to download the files in one piece. Maybe some video file was causing this?
@Roland Häder🇩🇪 @xy.. @Peter Vágner @xy.. I have no imagick installed I think, maybe I will install it later/soon.
Somehow the worker settings are not in my local.config.php, I have 11 max parallel workers, and fetch limit I believe is 3.
The problem is solved so far, but yes, sometimes there may be memory problems with big media files?
Thank you all for your help!
@Roland Häder🇩🇪 Die Hashtags in Deinem Profil finde ich zum kotzen rechtsextrem!

@Melanie Wehowski @Roland Häder🇩🇪

Ich hab den Kollegen schon lange ausgeblendet... denn nicht nur die Hashtags sind eigenartig, auch die anderen Aussagen und von ihm genannten Infoquellen sind mehr als suspekt...

@Melanie Wehowski Und wenn du mich schon auf die Hashtags ansprichst, kennst du z.B. #ILoveK1 , also den T-Shirt-Spruch "I L❤️ve K1"? Der kommt aus einem Film mit "Bud Spencer und Terrence Hill - Zwei bärenstarke Typen": https://de.m.wikipedia.org/wiki/Zwei_b%C3%A4renstarke_Typen

Hier z.B. siehst du es bei einem Handlanger von K1:
Filmszene mit Terrence Hill und Bud Spencer aus Zwei bärenstarke Typen, "I L❤️ve K1" ist auf einem T-Shirt eines Handlangers von dem Erzschurken K1 zu sehen.
Bildquelle: https://www.skodacommunity.de/threads/s1-s2-s3-i-love-k1.112881/

Ich kann dir so jeden einzelnen Hashtag erklaeren, den ich verwendet habe. Aber - in einem separaten Beitrag - mich um Erklaerungen zu den Hashtags zu bitten, empfindest du sie "zum Kotzen" und "rechtsextrem".