Skip to main content


Hey @Tobias since I updated to #Friendica 2020.09-RC yesterday, I have really long loading times. @Michael Vogel mentioned you have problems as well?. Do you also use #Nginx as I do?

!Friendica Support
@Tobias how can I find out if I have something like that? It does not sound like my problem, but I would like to check.

Loading this page, with the thread, took seconds, I think more than 20s. But the in the bottom of the page I see:
Database: 0.095/0, Network: 0, Rendering: 0.01, Session: 0, I/O: 0, Other: 0.07, Total: 0.18

The problem appeared yesterday, but in the same time I did switch to RC I did also update my system. I should really refrain from this updates at the same time. Nevertheless the problem should the go away very soon if it was a system update that caused the problem.
@Michael Vogel@Tobias alright you two.
I have to figure out what is going on, not sure how to do this without errors in the logs.
offtopic #help

Hi there,
sorry that I hike this post but I already posted a help request to helpers from D* and tried also to mention Micha and Tobi but had no luck so I try it this way.
I have a friendica profile.backup and want to extract the content on my PC (linux).
What kind of tool can I use to do so?

thx in advance ..
me
#help
@mʕ•ﻌ•ʔm no pm MP in town It is a JSON encoded file. I'm not aware of any ready.made tool to convert the content to separate files though.
It is really strange, it seems to be different reasons why the server is slow. This time a restart of php-fpm was the solution after I got gateway timeout 502 the whole day.

Can someone give me some info what changed from the last release to the RC?
@utzer You may have a look at the DB processes. I see quite a lot 'delete from notify' threads from time to time. They can slow down the site's performance when there are too many of them.
@Steffen K9 🐰 honestly I don't see any problems, that is my problem. I ran mysqltuner.pl, there is some output but nothing sticks out. Nginx seems to run fine, nothing strange in the error log. But again and again I have to restart the VM. I actually look for problems, can't find any, so I just reboot to solve the problem. It is then solved for a day or so, it will get slower and slower over time.

I really just have trouble since the update to the RC. I have it with two Friendica VMs, both have php-fpm, one Apache and one Nginx, both setups are similar.

I usually have JPM of 200, even higher, but now I get warnings from the monitoring all the time because the loading takes longer than 30 s. When I open the page I sometimes just geht 502 errors.
@utzer Don't know then. Must be something specific to your setup. RC is blazing fast compared to stable here.
To be sure... You don't need to look at the output of mysqltuner. You need to watch the actual DB processes in real time.
I updated to 2020.09 a couple days ago, and have been having this experience as well. Extremely slow load times compared to before the update, but no apparent errors. I reboot my VPS and it's fast for a bit, and then gets bogged down again.
Did you resolve your issue? was the fix with PHP settings?
@Matt Panhans the fix in my case was with php-fpm settings. Check if you use that, the easiest is to see if htop or "ps aux" shows any php-fpm processes running.
@Steffen K9 🐰 first question, how to I look at the processes live, is there anything better than the "SHOW PROCESSLIST;"?
@Tobias
On the jason backup.
What is it good for than or how can I access the content?
I tried to upload the backup to another friendica server but couldn't upload the backup file, only the profile file?
I mean, I don't understand the idea at all. I can download a backup but can't do anything with it?
Yes, you can resettle your profile to a new Friendica server @mʕ•ﻌ•ʔm jeSuisatire bitPickup [italic~irony] .. ᘛ⁐̤ᕐᐷ. Moving your conentent is a feature that is not yet implemented.
@Michael Vogel do you use php-fpm with dynamic number of children?

How about you @Steffen K9 🐰?

I increased the max.children to 40, then to 80, now to 120, I get
Sep 20 15:34:07 social php-fpm[2080501]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 111 total children
Sep 20 15:34:08 social php-fpm[2080501]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 115 total children
Sep 20 15:34:09 social php-fpm[2080501]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 119 total children
Sep 20 15:34:10 social php-fpm[2080501]: [WARNING] [pool www] server reached pm.max_children setting (120), consider raising it

I guess this is only a peak situation after reloading the php-fpm systemd job.

Do you guys mind to share your settings for php-fpm?
@utzer

PHP-FPM pool:
pm = dynamic
pm.max_children = 275
pm.start_servers = 24
pm.min_spare_servers = 6
pm.max_spare_servers = 42
pm.max_requests = 1250

With that number of PHP-FPM processes you also need a lot of possible DB connections available (PHP CLI + PHP-FPM + some safety room). So I have...

MariaDB conf:
max_connections = 386
@utzer Please keep in mind that the server needs enough memory to handle everything (web server, PHP, database, ...) - you can approx. calculate the needed memory for the settings to check if it fits.
@Steffen K9 🐰 ok, I did change my settings and increased to that far too, let's see how that behaves. Only thing I did not change was the "pm.max_requests", as I don't thing that the processes have to live this long, but lets see.

Thanks for the help.
This entry was edited (4 years ago)
@Steffen K9 🐰 I know, I added enough RAM to each VM, maybe in the future I will merge both VMs, as Friendica really needs lots of RAM in peak situations, which is not that good if the RAM is assigned to the machine all the time. But well, I still like the low maintenance setup of several VMs on one host.
@utzer The PHP processes are running endlessly under certain circumstances. They're only killed by PHP itself when they're unused (idle) and there are more of them as configured in pm.max_spare_servers. So there is a certain possibility that a FPM process could e.g. consume a lot of memory (e.g. some GB) and run for hours and hours. That setting pm.max_requests makes sure all FPM processes are soft killed and respawned after the configured number of handled requests. For me that means they're killed after approx. 1.5 hours.

That setting isn't necessary. But it's kind of a safety net for memory holes. I have made my experiences with php-imagick. :-)
@Steffen K9 🐰 I got that from the description and figured I leave the standard of the config, which was 200, so they take 200 jobs, then respawn. The time to respawn should not be an issue, so I thought better let them die more frequently.

I will now wait a day and see if the server slows down till 502 again or not. But certainly the max.children of 20 was too low, not sure how and why it was set like this.
@Steffen K9 🐰 still fast as heck, like before I switched to the RC. Really cool.
I am really thankful for your help and sorry for my whining about the problem.

I hope it stays like this.
@mʕ•ﻌ•ʔm no pm MP in town no I did not. The work around will be to write such a tool. I might be able to do (if I find the time) with my own backup files, so you don't have to send me yours.
well, I guess that might take a while.
:(
(what a pitty, it's a kinda book we were working on and now we cant't access it anymore, only that backup is left ..)
:-O
@mʕ•ﻌ•ʔm no pm MP in town It's just that I cannot promise anything. There is a Friendica Hackathon over the weekend, and I think it is likely that I can finding time then for Friendica related stuff...

For the book you would be mostly interested in the text of postings?
@Tobias
For the book you would be mostly interested in the text of postings?
Yes, the texts would suffice.
@Tobias
For the book you would be mostly interested in the text of postings?
Was meinst du, lässt sich da was machen?
@mʕ•ﻌ•ʔm jeSuisatire bitPickup [italic~irony] .. ᘛ⁐̤ᕐᐷ beim Hackathon habe ich an zwei Scripten gearbeitet. Wie gut die funktionieren kann ich nicht wirklich sagen, aber die dürften ein Saatpunkt für etwas sein mit dem ihr eure Texte raus bekommt.