Skip to main content


Thanks for this, I think this will help. That is the problem with Friendica, imagick sometime back used lots of RAM for GIF processing, now it might be something else, so php has 1024 MB limit, not sure where the 2.x GB come from, php script max mem. even higher before, because otherwise even processing of some PNG oder JPG failed before.

I was also wondering why MariaDB got killed with that little RAM and somehow was thinking it was the reason, but it seem PHP-FPM is. So I will look into this again. But I can't decrease the number of worker so far, that is not possible, the server would need too much time to process all the jobs when it is limited to 15 php processes or even 30 taking swap into account (rough estimations only).
I wonder if I could have different php-fpm pools for processes resulting from worker and from actual www requests?
that would actually be nice, just incomming www requests in one pool and all the queue tasks in another pool.
I realize, that php worker tasks are run by plain php and then there is php-fpm in addition. :-/
Oh, right, you can define separate php memory limits for the php.ini used by php-fpm and the one used by the cli php. I think in Debian derivatives there are different folders under /etc/php for each type of php binary.
It would still hammer the mysql db imho.

Tuning a mysql/mariadb is often something that depends on the load. There is a script that can be used that will look at a lot of settings.

https://github.com/major/MySQLTuner-perl

Straight from my brain I would tune the query cache and key memory, for starters but maybe that is already in place. Different howto's will describe how to tune it
@Hans Wolters@Admin (of friendica.utzer.de) changed something there too, found some fault in the comfig too, runing now, need to check later again.
Crashed again, need to check some more things. :-(
I guess the setup is the problem, I don't have time to change this now, but I will probably add a dedicated DB server for Friendica, so split it to web and DB Server at some point.

The server OOM happens always between 3:15 and 3:45 in the morning. No process runs at that time, so it might be some higher external load. I think next I will try to block all crawlers. Now the memory footprint it very low, fortunately #Friendica still works well like that. But I am not sure why MariaDB, still uses that much RAM, I thought I set it to use 9 GB max, but the DB is probably 30 GB now and if some setting permits it will use lots of RAM of course. So I need to check that.